Developer Downloads. All software downloads are free, and most come with a Developer License that allows you to use full versions of the products at no charge while developing and prototyping your applications, or for strictly self-educational purposes. (Unless otherwise specified, our technical support organization will not provide technical support, phone support, or updates to you for the. 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. A MAC mechanism that is based on cryptographic hash functions is referred to as HMAC. HMAC can be used with any cryptographic hash function, e.g., SHA256 or SHA384, in combination with a secret shared key. HMAC is specified in RFC 2104. Every implementation of the Java platform is required to support the following standard Mac algorithms: HmacSHA1. Finishes the MAC operation. A call to this method resets this Mac object to the state it was in when previously initialized via a call to init(Key) or init(Key, AlgorithmParameterSpec).That is, the object is reset and available to generate another MAC from the same key, if desired, via new calls to update and doFinal. (In order to reuse this Mac object with a different key, it must be. If you only plan to run Java applications, then install the Java Runtime Environment (JRE). The JRE is also referred to as Oracle Java. After you have installed the JRE, you can start Java applets and applications by double-clicking JAR files, JNLP files, and by using the browser.
Java is required for complete OpenOffice functionality. Java is mainly required for the HSQLDBdatabase engine (used by our database product Base) and to make use of accessibility and assistive technologies.Furthermore some wizards rely on Java technology. See additional topics pertaining to the use of Java in OpenOfficeand Apache OpenOffice in theInstallation FAQ.
So what does this mean exactly? Base (the database component) relies completely on Java technologies to run, but otherprograms (like Writer, Calc and Impress) only need Java for special functionality. If you do not need to use Base and donot want to use any of the Wizards, then you do not need to have Java installed and configured for running ApacheOpenOffice (and older versions of OpenOffice.org). You can completely prevent OpenOffice from prompting you about the useof Java by telling OpenOffice not to use a Java runtime environment (JRE). From the OpenOffice main menu use:'Tools - Options... - Java', and uncheck 'Use a Java runtime environment'. However, we do recommendthat you have a JRE on your system to take full advantage of OpenOffice's features without any issues.
Legacy versions of OpenOffice.org 3.3.0 and older included a JRE packaged with the download. Apache OpenOffice3.4.0 and newer do not!
You will need to have a JRE version (32-bit or 64-bit) that is compatible with the architecture of the ApacheOpenOffice version you downloaded. If you already have a JRE installed on your system that satisfies this requirement inone of the standard areas for Java installation, OpenOffice should detect this installation and let you choose it for usein OpenOffice via the 'Tools - Options... - Java'. If you have a JRE installed that is not detected,you should be able to add it through this same menu. And, you can install a JRE or configure OpenOffice to use Java at anytime to get missing functionality to work.
Important note for Windows users:
The Windows version of OpenOffice is 32-bit and therefore it requires a 32-bit JRE. Even when you have a Windows versionwith 64-bit installed.
Furthermore you have to install a 32-bit JRE - additionally or instead - when you already have a64-bit JRE installed.
The current versions of Apache OpenOffice work reliably with a variety of JREs includingOracle Java, versions 6, 7 and 8 andopenJDK, versions 6, 7 and 8. Feel free to download a JRE from either of these sitesif you feel you need this functionality.
Please report any problems you experience with using Java on OpenOffice through our bug reporting system,Bugzilla, or one of the other support venues listed in theApache OpenOffice Support webpage, either the users list or forums.
For installing Java on Windows machines, one might appreciate:Download Instructions for Windows offline.
xml:lang='en-US'>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:
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.
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.
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:
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.
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.
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:
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.
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.
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):