I get an UnsupportedClassVersionError thrown when launching jnlp, however when I try to run the relevant jar files from command line everything works fine. I tried setting j2se versions to 1.5+, 1.6+, using signed/unsigned jar files, but all that doesn't help.
I'm trying to launch my own jar file with two supporting jar files (mysql-connector.jar and swingx.jar). My jar file has been compiled with 1.6 compliance settings in Eclipse and built into a jar with ant. Since I can launch the 3 jars from command line using java 1.6 I'm a bit baffled that jnlp fails. Any help is appreciated.
Here is the jnlp file:
<?xml version="1.0" encoding="utf-8"?>
<!-- JNLP File -->
<jnlp spec="1.5+" codebase="http://www.etc.com/p" href="demo-daily.jnlp">
<information>
<title>demo: daily stock charting utility</title>
<offline-allowed/>
</information>
<security>
</security>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.6+" />
<jar href="demo-daily.jar" main="true" />
<jar href="swingx.jar" main="false" />
<jar href="mysql-connector.jar" main="false" />
</resources>
<application-desc main-class="quipu.viewers.charts.stockcharts.daily"/>
</jnlp>
The error I get is:
java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:675) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$100(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at com.sun.jnlp.JNLPClassLoader.findClass(JNLPClassLoader.java:256) at java.lang.ClassLoader.loadClass(ClassLoader.java:316) at java.lang.ClassLoader.loadClass(ClassLoader.java:251) at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1052) at com.sun.javaws.Launcher.run(Launcher.java:105) at java.lang.Thread.run(Thread.java:613)