I’m afraid I get a console error on launch, using the jarfile-
Exception in thread "main" java.lang.UnsupportedClassVersionError: net/phatcode/rel/Main : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:249)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
I had to roll back the JRE to version 6, download the tinysound jar, fix the build paths and tweak some of the field parameterisations in Sonics.java and Spline.java before I could get it to run in Eclipse. Then I get the following console error-
Unsupported audio resource!
could not get audio input stream from input URL
Exception in thread "main" java.lang.NullPointerException
at net.phatcode.rel.utils.Sonics.playMusic(Sonics.java:57)
at net.phatcode.rel.Game.init(Game.java:114)
at net.phatcode.rel.Game.run(Game.java:237)
at net.phatcode.rel.Screen.playGame(Screen.java:74)
at net.phatcode.rel.Main.main(Main.java:16)
I’m using a 2.4 GHz Intel Core 2 Duo Macbook, with a NVIDIA GeForce 320M 256 MB graphics card. It’s a shame, since I’ve been looking for some examples of high-performing java2D code in action.