greatspn / SOURCES

Main repository of the GreatSPN framework
GNU General Public License v2.0
42 stars 13 forks source link

Mac OS installation instructions not working #25

Closed Prodogy11 closed 2 years ago

Prodogy11 commented 3 years ago

The precompiled binary for Mac OSX launches with an error about not finding something on the class path. Building from sources, although it says its finished successfully, does not have executable file in the /SOURCES/JavaGUI/Editor/dist like the instructions mention. The contents of that directory are as follows:

lib --AbsoluteLayout.jar --antlr-runtime-4.2.1.jar --jlatexmath-1.0.8-SNAPSHOT.jar --swing-layout-1.0.4.jar

I do find an "Editor.jar" file in my downloads directory, however, moving it to the correct directory and attempting to run it, gives me the same error as trying to use the precompiled MacOS binary.

Error below:

java.lang.NoClassDefFoundError: java/awt/desktop/QuitHandler at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:264) at editor.gui.AppWindow.(AppWindow.java:346) at editor.Main$1.run(Main.java:64) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) at java.awt.EventQueue.access$500(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:709) at java.awt.EventQueue$3.run(EventQueue.java:703) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:74) at java.awt.EventQueue.dispatchEvent(EventQueue.java:728) at editor.Main$2.dispatchEvent(Main.java:190) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:205) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Caused by: java.lang.ClassNotFoundException: java.awt.desktop.QuitHandler at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 19 more

Please help.

Prodogy11 commented 3 years ago

It works if I move the bin found I found in my Downloads folder, move it to ~/GreatSPN/SOURCES/objects/JavaGUI, and run ./run.sh editor in the SOURCES directory. This should be added to the readme and certainly the install instructions.

amparore commented 3 years ago

It could be a problem of the java version you have installed. java.awt.desktop.QuitHandler is a Java 9+ class, it looks like you have an older version. Currently, we suggest to use OpenJDK version 11 or greater. If the .app is missing, you should be able to run the java application with the command: java -jar Editor.jar

EDIT: I have added an error popup to the Editor that warns you if you are not running the required Java version (which is 11+ right now). This should help to investigate if the problem is in the default Java version.

Prodogy11 commented 3 years ago

@amparore Thanks for your reply. Yeah, it turned out to not be the java version. I have multiple versions of java on my mac, including java 11. It turned out the editor.jar was installed in wrong place. And also, the instructions on the page are not accurate. i.e I ran run.sh editor, from the SOURCES director to get it to run after moving the editor.jar. The instructions say a precompiled app is generated in SOURCES/JavaGUI/Editor/dist, but that is not the case.

amparore commented 3 years ago

in order for me to understand what is going on, you have to send me more information. What java are you running? What is the output of the make process? Are you using the latest version of the repo (currently I am making some changes to the build system)? If you type: make clean_JavaGUI JavaGUI does it build the editor correctly and you have the objects/JavaGUI/bin/Editor.jar file ?

amparore commented 2 years ago

closing for inactivity.