'Can't create Mac executable from Eclipse Java

I am updating a 100,000 line Mac OSX application from 2010 that uses Eclipse Galileo and whatever version of Java was current at that time. The application controls several educational telescopes.

When I try the Eclipse "export to Mac application bundle" menu item, I get an output called MicroObservatory.app, but inside there are only the info.plist, some icons, and the "MacOSX" folder and the "Java" folder, but the "MacOSX" folder and the Java folder are empty!

I tried following a tutorial using appbuilder, but I found out that it was no longer current, couldn't be downloaded from the Oracle site, and was replaced by ORacle's "jpackage" - however, when I try to run "jpackage" I get an error message saying "unable to find a Java Runtime that supports jpackage", despite my having reinstalled the latest Java, and also set the path variable "JAVA_HOME" to usr/bin/java, which is where Java resides.

Creating an "executable JAR" gives me a runnable application (!) which can be run by invoking "java -jar MicroObservatoryRunnable.jar", which shows that java is there and everything can be run, however it doesn't get my a clickable application with an icon. Can anyone suggest what the problems could be? The 12+ years ago versions of Eclipse and Java created a "Mac application bundle" according to the notes I have from that time.

I have had to make many modifications to the Java code, and the goal is to have it running on new Macs with the latest OS and Eclipse and Java, so going back to the old versions is not an option.

Thanks so much ! (My native language is C, and mostly I developed embedded systems, such as the telescopes that are run by this software, so sorry I am not that Mac literate.)



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source