UnsupportedClassVersionError
I downloaded a software sometime back and when I ran it I got the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: <Class Name> (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
This happened since my default java version is 1.3 and not 1.4 - which was the version that the above application required.
Wouldn't it be nice if one could capture this in the application and display a better message to the user - stating "You need JDK Version x.y" to run this application?
I downloaded a software sometime back and when I ran it I got the following error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: <Class Name> (Unsupported major.minor version 48.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
This happened since my default java version is 1.3 and not 1.4 - which was the version that the above application required.
Wouldn't it be nice if one could capture this in the application and display a better message to the user - stating "You need JDK Version x.y" to run this application?
0 Comments:
Post a Comment
<< Home