Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.UnsupportedClassVersionError: io/vertx/core/Starter Error

Tags:

java

vert.x

While running ./vertx version command from ${VERTX_HOME}/bin

I get:

Exception in thread "main" java.lang.UnsupportedClassVersionError: io/vertx/core/Starter : 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 tried with-

  1. 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)
  2. java version '1.7.XX'
like image 543
Visvendra Singh Rajpoot Avatar asked Jul 18 '15 17:07

Visvendra Singh Rajpoot


2 Answers

Which version of Vertx are you running ?

Vertx 3.0 ( the current release ) runs with Java 8.0 and above only. Please check if your JAVA_HOME is set correctly to point to 8.0 version indeed.

like image 55
Agraj Avatar answered Nov 10 '22 23:11

Agraj


I just have this problem ,and it because of the jdk version,vert.x-3.0.0 need jdk-1.8. If you have change the JAVA_HOME to jdk-1.8,but the java -version still show 1.7,I suggest you check the 'C:\Windows\System32' where maybe have java.exe file. The quick way to figure out this problem is put %JAVA_HOME%/bin in the begin of path variable.

like image 29
cloudLiu Avatar answered Nov 10 '22 23:11

cloudLiu