26.03.2020

How To Bundle Java Application For Mac

'=20 A prototype launcher stub is present in the source code at:=20 =20 The Xcode project file in that directory will build a shell.app with th= e launcher stub and an example Info.plist.=20 The next steps for this code is to be adapted into the JDK's proper Make= file-driven build system, and to create an artifact in the standard JDK bun= dle. After that, a script or Ant target which can be driven by and IDE shou= ld take that artifact and a application descriptor to create a proper.app.= =20 Contributed steps to bundle f= rom the macosx-port-dev@openjdk.java.net mailing list:=20 - -= -=20 STEP 1. Checkout, download, install & build the MacOS OpenJDK packag= e as described on the Oracle OpenJDK Mac OS X Port page:=20 =20 STEP 2.

How To Bundle Java Application For Mac

Identify & launch the JavaAppLauncher.xcodeproj located in y= our /YOURINSTALLPATH/jdk7u-dev/jdk/src/macosx/bundle/JavaAppLauncher/= directory.=20 STEP 3. In the Xcode project repair any undefined file paths. These woul= d be indicated in the files tab in the Xcode project left side bar in red.

= I had to update the 1.7.0.jdk & 1.7.0.jre paths to the bundles stored i= n /YOURINSTALLPATH/jdk7u-dev/build/macosx-amd64/j2sdk-image/ directory an= d the /YOURINSTALLPATH/jdk7u-dev/build/macosx-amd64/j2re-image/1.7.0.jre = respectively. I also had to update all the files in the include diretory wh= ich included:=20 /include/classfileconstants.h /include/darwin/jawtmd.h /includ= e/darwin/jinimd.h /include/jawt.h /include/jdwpTransport.h /in= clude/jni.h /include/jvmti.h /include/jvmticmlr.h=20 All the above I found in the /YOURINSTALLPATH/jdk7u-dev/build/macosx-a= md64/include/ directory.=20 I also need to find the /frameworks/Cocoa.framework/Headers/Cocoa.h refe= rence. I used the one hosted in /System/Library/Frameworks/Cocoa.framework/= Versions/A/Headers/ directory.=20 I specified all the 'Location' paths in the Xcode UI as Absolute Path=20 STEP 4. Build the project in Xcode. If all goes well you'll find the pro= duct JavaAppLauncher.app which will give you a template to base your own ap= p bundle from. Xcode will give you the path of the project output.

Mine was=:=20 /Users/memyselfandI/Library/Developer/Xcode/DerivedData/JavaAppLaunch= er-aukxmnehzjucapfxrjaqkfoicyak/Build/Products/Debug/JavaAppLauncher.app&nb= sp;=20 STEP 5. Copy/Paste the JavaAppLaucher.app/Contents/MacOS/JavaAppLauncher= stub as well as the JavaAppLaucher.app/Contents/Plugins directory (the ent= ire contents) into your own Java Application Bundle. Also copy 'YourExecut= ableJarFile.jar' into a YourApp.app/Contents/Java/ directory.=20 STEP 6.

'Very nice tutorial.' J.H., September 18, 2018 'Hi! Thanks for a great tutorial.' R.D., April 4, 2018 'Super good tutorial to make a hard job simple.' G., April 23, 2014 'Great Tutorial.

Newest Java For Mac

Didn't expect that 'write some java, compile and run it' can be so easy.' C.S., October 16, 2013 'Fantastic! Much appreciated =)'T.B., April 15, 2013 'It just works! J.G., January 18, 2012 'Thank you for your 'Mac Java!' Tutorial on bundling a JAR and making an installer.

How To Bundle Java Application For Mac Pro

It couldn't be any better!!!' Anonymous, October 20, 2011 'ce que je cherchais, merci'A.M., May 3, 2010.