Mac OS X JavaApplicationStub for Java 6 and Java 7

I am developing a cross-platform Java application with native executables. For Mac OS X, I use Jarbundler as an ANT task to build an application package.

Now that Oracle has released Java 7 and its own ANT Appbundler task, "I'm having a problem.

Using the embedded Mac OS X JavaApplicationStub with Jarbundler only works for Apple Java 6, and using Oracle JavaApplicationStub with Appbundler only works for Java 7.

I well understand that this is good, but I was wondering if JavaApplicationStub is available, which works with both Java 6 and Java 7. I have not found it yet ...

And btw: should JavaApplicationStub be native C / C ++ / C # binary? Or could it be executable shellscript?


Update:

A shell script is a possible alternative to the native JavaApplicationStub.

I expanded the base Ian Roberts script and released it on GitHub as "universalJavaApplicationStub" . Now it supports both Apple Java 6 and Oracle Java 7, as well as styles Info.plistfor Java properties in the application suite (Oracle introduced new property keys). Feel free to use it!

+4
source share
2 answers

script, script, /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java ( Java 7 JRE), /usr/bin/java, . JDK, (6 7), Java 6, JDK .

+2

, @IanRoberts " Java AppBundler, JRE, JAVA_HOME" .

JavaApplicationStub shellscript Java 6, Java 7.

+2

Source: https://habr.com/ru/post/1530830/


All Articles