Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/bukkit/craftbukkit/bootstrap/Main has been compiled by a more recent version of the Java Runtime (class file version 60.0), this version of the Java Runtime only recognizes class file versions up to 52.0
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:495)


This error is related to your Java Version. Please make sure, you are using the correct version for the jar executable you are trying to execute.

ProgrammJava Version
CaveCloud Cloudat least Oracle Java 17
CaveCloud Wrapperat least Oracle Java 17
CaveCloud Downloaderat least Oracle Java 17
Spigot (Versions 1.16 - latest)at least Java 16
Spigot (Versions before 1.16)Java 8

We recommend using Oracle Java for all our applications, since our testing is done with this version of Java. Other versions might work as well, but we can not guarantee that.


Use of different Java Versions per Server Group

By default, all servers are started with the same version, as you use to start the Wrapper. If you want to use a specific Java Version for a Server Group, you can do so by editing the "group.json" file in your Cloud configuration.

Simply insert your Java-Path in the 'javaPath'-Variable.

{
  "LOBBY": {
    "isStatic": false,
    "minimal_server": 0,
    "maxPlayers": 20,
    "serverJar": "spigot.jar",
    "wrapperid": 1,
    "startParam": {
      "Dcavecloud.startParam": "startParam"
    },
    "name": "LOBBY",
    "execPercentage": 0,
    "start_amount": 0,
    "copyGlobal": true,
    "ram": 512,
    "javaPath": "/usr/java"
   }
}

Example for Linux: "/usr/java/bin/java"

Example for Windows: "C:\\Program Files\\Java\\Java 1.17\\bin\\java.exe" (please make sure, you use "\\" as your path delimiter)

  • No labels