There are several keys that Apple defines, and you might want to check them out.
Apple defines several keys for its App format. You can change this behavior, and pass in another main class with the -m, -main-class option. It looks inside your jar file for the MANIFEST.MF file and extracts the name of the main class. Does jar2app figure the main class of my jar automatically? Can I change it? the first folder should be named Contents, etc). This JRE/JDK should match the directory structure found in Oracle's JDK (i.e. It can be supplied as a folder or as a zipfile. You can, however, pass it a JRE/JDK with the -r, -runtime option. For a full list of options, see here Does jar2app bundle its own JRE/JDK? Can I bundle my own?īy default, jar2app doesn't bundle any JRE or JDK, and the default will be used on each system. You can change many things, but more specifically, you can change the icon, the display name (the one that appears on the menu bar), the version and copyright information, the bundled JDK/JRE and the JVM options. The other wrapper I saw out there was from the Packr project and it really depended on their way of doing this. I know that there are other solutions that write their own wrapper, but the provided wrapper seems to work great (it's also bundled by Weka). Additionally, if you so wish, your own JDK or JRE can be bundled and the ist file will be updated to reflect this. Essentially, all that jar2app has to do is create a directory structure (app files are just directories), pack JavaAppLauncher and your application in it and set appropriate values in an ist file. The JVM can be bundled with the App file, or the system-wide-one can be used. This application, officially provided by Oracle (previously Apple), acts as wrapper that starts a JVM with a set of options.
Jar2app relies on JavaAppLauncher (although you don't need to install anything). This will install the jar2app application/script and make it available for you to run. It will install to /usr/bin, but you can change this by passing your desired prefix to install.sh, as an argument. Just clone the repository and run install.sh, or uninstall.sh to remove it.
For more information on how to submit bundles to the appstore, see here and here. This is not a limitation of jar2app, it's just how the Appstore requires you to do things. Jar2app may bundle your jar, but there are several steps you further need to take to submit your application to the Appstore.
If you think that's just a strong case of NIH, feel free to grab what you want from me and send a patch to the other projects :) Just follow the GPL! Can I submit bundles created with jar2app to the Appstore? The solution I was left with was just rolling out my own. Most of the other alternatives require third-party tools that embed other functionality and which simply cannot be stripped.
Packr uses a custom launcher and is meant to pack things for Mac OS X, Windows and Linux. If you're also considering why these contributions weren't just sent to one of the other projects, it is because this could not be done easily. Really, isn't it wonderful to have such an easy-to-use interface? jar2app, however, tries to keep the power of those utilities while providing high simplicity in the process. Most solutions out there require a gazillion arguments, or installing ant and memorizing lots of conventions. However, this project was born out of the need to do something easily and without much cruft. I acknowledge them and even have several links to them. (TOC created with the help of gh-md-toc) Aren't there other tools that do this? Why another one?
It should run in any operating system (Windows, Mac OS X, Linux), but of course you'll only test the results in a Mac OS X system. Though simple and easy to use, there are loads of configurable options, such as setting icons, bundle names or bundling your own JRE/JDK.