Page 1 of 1

Unsupported major.minor version 52.0

PostPosted: Thu Jun 18, 2015 6:36 pm
by JMartelot
Hi,

I'have check on your forum and found some topic with the same problem but I never founded a great solution ...

So when I want to launch ./serviio.sh, I get this error message :

  Code:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/serviio/MediaServer : Unsupported major.minor version 52.0
   at java.lang.ClassLoader.defineClass1(Native Method)
   at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
   at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
   at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
   at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
   at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
   at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
   at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
   at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)


I have updated java :

  Code:
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)


But, the error is still here ..

Any idea about this ?

Thanks for your answer, and sorry for my english ;)

Regards,

Jean

Re: Unsupported major.minor version 52.0

PostPosted: Thu Jun 18, 2015 7:13 pm
by JMartelot
Hi, I finally found a solution.

I should update the JAVA_HOME path into /etc/environment

Hope, this can help others.

Regards,

Jean

Re: Unsupported major.minor version 52.0

PostPosted: Thu Jun 18, 2015 11:55 pm
by atc98092
Nice work finding it so quickly, and providing the fix. :D

Re: Unsupported major.minor version 52.0

PostPosted: Wed Oct 30, 2019 7:05 am
by creigelde
It is because of Java version mismatch. Unsupported major.minor version error happens when you compile your projects on higher version of java(e.g. jdk 1.8) and then run it on a lower version (e.g. jdk 1.7). Depending on your situation, you have two ways to resolve this error: compile your code for an earlier version of Java, or run your code on a newer Java version. Sometimes you may have more than one version of Java SDK installed in your machine. Make sure the application you are running is pointing to the right or highest version available . It is better you need to install both JRE/JDK with the same version.