Java -jar JAR file Alternatively, if you know that the JAR file can be run using java -jar, locate the file in the Finder and double-click it. The application should start normally. If you would like to use Java from your browser or through a webstart application you will need to wait for the consumer release on Mac. Download Jar for Mac to keep cookies from sites in your history, bookmarks or top sites.
- Free Java Download For Mac
- Java Jar Launcher Download Mac
- Mysql-connector-java-8.0.11.jar Download For Mac
- Download Java For Mac
- Oracle Java Download For Mac
- Java 1.7 Download Mac
These documentation pages are no longer current. They remain available for archival purposes. Please visit
https://docs.oracle.com/javase
for the most up-to-date documentation.This page shows you, step by step, how to convert a simple Java application to a version you can distribute on a Mac. To follow along, download the ButtonDemo (.zip) example from the Java Tutorial. This example was created using NetBeans which uses the Ant utility. You can run all necessary tools and make all necessary edits from the command line, without launching NetBeans. The Ant tool is required.
You have created a Java application and want to bundle it for deployment. This requires the following steps:
Create a JAR File
This step creates the ButtonDemo.jar file.
Execute ant jar in the high-level project directory to create the dist/ButtonDemo.jar file. This jar file is used to create the .app package.
Bundle the JAR File into an App Package
To create the ButtonDemo.app package, use the appbundler tool. The appbundler is not shipped with the 7u6 version of the Oracle JDK for the Mac. You can download it from the Java Application Bundler project on java.net. There is also AppBundler Documentation available.
As of this writing, the most recent version is appbundler-1.0.jar, which is used by this document. Download the latest version available and substitute the file name accordingly.
- Install the appbundler-1.0.jar file. In this case, create a lib directory in the high-level project directory and add the appbundler-1.0.jar file.
- Modify the build.xml file in the high-level project directory as follows. (The added code is shown in bold.)
- Invoke the appbundler by typing ant bundle-buttonDemo from the high-level project directory. This creates the ButtonDemo.app package in the dist directory.
- You should now be able to launch the application by double clicking ButtonDemo.app in the Finder, or by typing open ButtonDemo.app at the command line.
Bundle the JRE with the App Package
In order to distribute a Java application, you want to avoid dependencies on third party software. Your app package should include the Java Runtime Environment, or JRE. In fact, the Apple Store requires the use of an embedded JRE as a prerequisite for Mac App Store distribution. The runtime sub-element of the <bundleapp> task specifies the root of the JRE that will be included in the app package.
In this example, the location of the JRE is defined using the JAVA_HOME environment variable. However, you might choose to bundle a JRE that is not the same as the one you are using for development. For example you might be developing on 7u6, but you need to bundle the app with 7u4. You will define runtime accordingly.
Since this example defines the runtime sub-element using JAVA_HOME, make sure it is configured correctly for your environment. For example, in your .bashrc file, define JAVA_HOME as follows:
Use the following steps to modify the build.xml file at the top of the project directory:
- Specify an environment property, named env:
- In the target that creates the bundle, specify the location of the JRE on your system, using the env property:
The resulting build.xml file should look like the following. (The new lines are shown in bold.)
Create a fresh version of ButtonDemo.app, using the ant bundle-buttonDemo command. The resulting version includes the JRE in the app package. You can confirm this by examining the Contents/PlugIns directory inside of the app package.
Sign the App
![Mac Mac](/uploads/1/2/7/2/127228846/747268901.jpg)
The Gatekeeper feature, introduced in Mountain Lion (OS X 10.8), allows users to set the level of security for downloaded applications. By default, Gatekeeper is set to allow only OS X App Store and Developer ID signed applications. Unless your app is signed with a Developer ID certificate provided by Apple, your application will not launch on a system with Gatekeeper's default settings.
For information on the signing certificates available, see Code Signing Tasks on developer.apple.com.
![Java Jar Download For Mac Java Jar Download For Mac](/uploads/1/2/7/2/127228846/683633559.png)
The signing certificate contains a field called Common Name. Use the string from the Common Name field to sign your application.
Sign your app using the codesign(1) tool, as shown in the following example:
To verify that the app is signed, the following command provides information about the signing status of the app:
Free Java Download For Mac
To check whether an application can be launched when Gatekeeper is enabled, use the spctl command:
If you leave off the --verbose tag, and it does not print any output, indicates 'success'.
For more information, see Distributing Outside the Mac App Store on developer.apple.com.
Submitting an App to the Mac App Store
Packaging an app for the Mac App Store is similar to packaging for regular distribution up until the step of signing the app. Signing the app for the Mac App Store requires a few more steps, and a different kind of certificate.
Java Jar Launcher Download Mac
You will need to create an application ID and then obtain a distribution certificate for that application ID. Submit your app using Application Loader. For more information, see the following links (on developer.apple.com):
Mysql-connector-java-8.0.11.jar Download For Mac
Copyright © 1993, 2020, Oracle and/or its affiliates. All rights reserved.
Jar2Exe is to convert jar files to executive binary files for Windows and Linux. Why should we select to wrap jar files into exe files with Jar2Exe, because it makes java program more convenient:
- It makes java program more easy to run.
- It makes java program more safe to redistribute by encryption.
- It makes java program more powerful by function enhancement.
Jar2Exe is growing from 2006 and is always actively upgraded and maintained. Comparing with other similar software, why should you select Jar2Exe:
- Jar files encryption, encrypted program will not write temporary files when it runs
- Service type of application, without special coding.
- Friendly to use, Jar2Exe has wizard mode and command line mode to run
- Both Windows and Linux, no difference to be protected and to run as service on windows and Linux
You can follow the steps of these solution advices to get to know how to use Jar2Exe. Of course, Jar2Exe can do more than these solutions.
- Console tool, a common java program to start at command line, usually with arguments
- Desktop window, a window program to display a window from Java
- Background service, to run as background service, it can automatically starts up when System starts up
- Webapp to a single exe, encrypt and wrap webapp as a standalong server, in a single exe file
- More safety, try our best to let java program safer
- You can get more details about solutions on Solutions advices page.
Download Java For Mac
Jar2Exe v2.x has many new features, the main upgrades are:
Oracle Java Download For Mac
- Since V2.1, it is supported to generate binary files for Mac OS X.
- For Linux, since V2.0, to generate binary for Linux is supported
- Export equivalent 'command line', this makes it more easy to use the command line mode of Jar2Exe, you need not to write the long command line string.
- Configure Internal & External, you can select to put the configurations internal in binary file or external in a configuration file.
Java 1.7 Download Mac
- There are many new features, please refer to What's New page for details.