Using the appbundler ant task from oracle (http://docs.oracle.com/javase/7/docs/technotes/guides/jweb/packagingAppsForMac.html) I’m able the create a working Mac app with bundled JRE7 but loading some resources like native libraries failed because the path in the Info.plist seams not valid.
In the build.xml ant task I use for example (my native libs are copied to the Contents/Java Folder inside the app-bundle):
a) <option value="-Djava.library.path=Contents/Java/" />
b) <option value="-Djava.library.path=$JAVAROOT/" />
c) <option value="-Djava.library.path=$APP_PACKAGE/Contents/Java/" />
All results in a UnsatisfiedLinkError. Also some other resources like splash-image are not found:
<option value="-splash:Contents/Java/my-splash.png" />
Any idea how to correctly set the path for JVMOptions here?
Edit: The Java7 appbundler uses not the same syntax for plist as the Jar Bundler from Apple which comes with jdk6 e.g. there’s no “Java” dict to add SplashFile.
According to the appbundler task documentation the magic variable you’re looking for is
$APP_ROOT:This also works for
<argument value="..."/>(arguments to your main class, as opposed to options to the JVM).