I'm trying to create a java-based GUI for both Mac and windows. So far, I've been able to create an executable .jar file that runs on Windows.
The issue I'm running into is running that .jar on Mac. When I double-click to run, it says I should use -XstartOnFirstThread option to run the .jar. So, I've created a shell script that simply opens it with the following line of code:
java -XstartOnFirstThread -jar myJar.jar
This runs the program well, but it's not a solution that is easily distributable. So, I'm trying to bundle the .jar into a Mac app. So far, everything I've tried results in the same error code:
LSOpenURLsWithRole() failed for the application MyApp.app with error -10810
Here's what I've tried so far:
JarBundler (link here): same issue
Java Tutorial: tried following this tutorial, but appbundler seems not to exist anymore (at least I can't find it on my mac and I can't find it on Java's website) and most of the links to other softwares that are on this page are dead.
AppBundler ant task (link here): Couldn't quite firgure out how to use this.
Eclipse OS-X App Bundler: same issue.
changing permissions on the executable JavaApplicationStub within the app: same issue
bundling the app on my own from scratch: same issue.
I'm pretty much out of ideas at this point, is there anything I am missing?
EDIT: The .jar file that I'm using was created by Eclipse's "create runnable JAR file" export option. Not sure if this makes a different or not.