Forum: Technical Support: Game doesn't start on Mac: java.lang.ClassNotFoundException: org.jdesktop.layout.GroupLayout$Group
Chris 2014/02/01 07:18 |
Here is the exception I get when I try to run the game on Mac:
cthaling@macbook:~/Downloads/Resistance Force.app/Contents/Resources$ java -Xdock:name="Resistance Force" -Xdock:icon=ResistanceForce.icns -Xmx1024m -Xbootclasspath/p:lib/vecmath.jar -Djava.library.path=lib/macosx -cp lib/engine.jar:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/vecmath.jar:lib/Continuations_full_2008-12-25_11-52.jar:lib/jbullet.jar:lib/jna.jar:lib/modern3d.jar:lib/pureswing.jar:lib/swing-layout.jar:lib/trove-2.0.3.jar:lib/xpp3-1.1.4c.jar:lib/asm-all-3.1.jar engine.PreLaunch Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: org/jdesktop/layout/GroupLayout$Group at engine.ag.run(SourceFile:44) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:744) at java.awt.EventQueue.access$400(EventQueue.java:97) at java.awt.EventQueue$3.run(EventQueue.java:697) at java.awt.EventQueue$3.run(EventQueue.java:691) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:75) at java.awt.EventQueue.dispatchEvent(EventQueue.java:714) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) 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: org.jdesktop.layout.GroupLayout$Group at java.net.URLClassLoader$1.run(URLClassLoader.java:372) at java.net.URLClassLoader$1.run(URLClassLoader.java:361) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:360) at java.lang.ClassLoader.loadClass(ClassLoader.java:424) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) at java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 15 more |
Chris 2014/02/01 07:20 |
Getting swing-layout-1.0.3.jar and appending to the class path almost makes it work but not quite:
$ java -Xdock:name="Resistance Force" -Xdock:icon=ResistanceForce.icns -Xmx1024m -Xbootclasspath/p:lib/vecmath.jar -Djava.library.path=lib/macosx -cp lib/engine.jar:lib/jinput.jar:lib/lwjgl.jar:lib/lwjgl_util.jar:lib/vecmath.jar:lib/Continuations_full_2008-12-25_11-52.jar:lib/jbullet.jar:lib/jna.jar:lib/modern3d.jar:lib/pureswing.jar:lib/swing-layout.jar:lib/trove-2.0.3.jar:lib/xpp3-1.1.4c.jar:lib/asm-all-3.1.jar:lib/swing-layout-1.0.3.jar engine.PreLaunch 22:18:52 [info] logging started at 2014/01/31 22:18:52 -0800 22:18:52 [info] public alpha version - build #17 (2012/12/08) 22:18:52 [info] registered data path '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0006.zip' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0005.zip' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0004.zip' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0003.zip' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0002.zip' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0001.zip' 22:18:52 [info] registered '/Users/cthaling/Downloads/Resistance Force.app/Contents/Resources/data/resforce0000.zip' 22:18:52 [error] unhandled exception occurred in thread "main" [...] java.lang.NullPointerException [...] at engine.ez.<init>(SourceFile:42) [...] at engine.ez.<init>(SourceFile:29) [...] at engine.cF.init(SourceFile:21) [...] at engine.dg.<init>(SourceFile:36) [...] at engine.Launch.main(SourceFile:60) [...] at engine.aN.run(SourceFile:192) [...] at engine.PreLaunch.main(SourceFile:54) AL lib: ReleaseALC: 1 device not closed |
jezek2 2014/02/01 12:02 |
Thanks for the report, these are interesting errors. Both seems to be related to Java. What version of Java are you using and what Mac OS X version?
The first one is not relevant for the next version as the GUI system was rewritten and doesn't use any Swing classes anymore. The second one is related to loading of sounds I'll switch to custom code for loading the sounds instead of relying on Java and I'll add more robust handling for such cases so the game can work even with particular sounds disabled. |
Chris 2014/02/03 23:23 |
I'm using Java 8 on Mac OS X 10.9.1:
$ java -version java version "1.8.0-ea" Java(TM) SE Runtime Environment (build 1.8.0-ea-b123) Java HotSpot(TM) 64-Bit Server VM (build 25.0-b65, mixed mode) |