简体   繁体   中英

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

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'

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM