My program works fine in Eclipse. However, if I try to export it as a runnable jar, the jar doesn't open when I double click it. Is there a way, in Eclipse, to export directly to a .app?
The gradle-macappbundle plugin is the easiest way I know how to do this. It hooks into your build system and generates the .app
for you.
If you want to roll your own solution, Apple’s Java Deployment Options for OS X gives you all the information you need to know about doing this. Basically a .app
is just a folder containing a JAR, with some XML files giving the classpath and so on. You can read that guide for all the details.