0

I am trying to run SOLR 9.4 on a machine

I have java version 1.8.0_391 installed

JAVA_HOME is set to C:\Program Files (x86)\Java\jre1.8.0_331

java -version gives the following:

java version "1.8.0_391"
Java(TM) SE Runtime Environment (build 1.8.0_391-b26)
Java HotSpot(TM) Client VM (build 25.391-b26, mixed mode, sharing)

When I run bin\solr start

I get the following exception

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/apache/solr/cli/SolrCLI has been compiled by a more recent version of the Java Runtime (class file version 55.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(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.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 sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)

ERROR: Solr did not start or was not reachable. Check the logs for errors.

What version of java needs to be installed?

5
  • 1
    Hint: ALWAYS google the exception before doing anything else. Commented Jan 3 at 19:41
  • 52 is Java 8. 55 is Java 11. List of Java class file format major version numbers. Commented Jan 3 at 20:10
  • @JimGarrison - thanks Jim, I did, but didnt find the answer, so I asked here Commented Jan 3 at 21:27
  • @DavidConrad (The versioning of java confuses me, so please bear with me) so if I want to install java 11, am I looking for 1.11 jre? Commented Jan 3 at 21:33
  • 1
    No, the 1. prefix was dropped with Java 9, which is just called 9, not 1.9. Java 11 is just Java 11, not 1.11. Commented Jan 4 at 0:02

0

Browse other questions tagged or ask your own question.