All I\'m trying to do is convert a simple java program into a macOSX .app file so I can distribute it as a simple executable file.
I\'ve read all over the place and
If you want to use Oracle Java instead of Apple's discontinued Java, you should use Java Application Bundler instead of JarBundler.
See also these answers:
Worked for me! For some reason I couldn't put the jarbundler .jar
file in the Ant area, but instead had to point at it explicitly from the build.xml (I put it in <projectRoot>/jarbundler/jarbundler-2.2.0.jar
). My build.xml looked like:
<?xml version="1.0" encoding="UTF-8"?>
<project name="TripleWhammy" default="default" basedir=".">
<taskdef name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler"
classpath="jarbundler/jarbundler-2.2.0.jar" />
<target name="bundle">
<jarbundler dir="."
name="Triple Whammy"
mainclass="org.bigclue.TripleWhammy"
jar="target/triple-whammy-1.0-jar-with-dependencies.jar"
icon="triple-whammy.icns"/>
</target>
</project>
This created "Triple Whammy.app" in my project directory. My icon looks good. Sweet.
Now that I've built a simple distributable dice .app
, time to build something awesome...
(Mac OS X 10.6.8, Java 1.6.0_51, Ant 1.8.4; built my .jar using Maven 3.0.4 and its "assembly" plugin version 2.4).
On Mac OS X, an application bundle is a directory that has a name ending in .app
and that contains the resources used by the application. This game is an example that constructs the bundle in situ using an ant
build script. Additional references are cited here.