Cannot run ElasticSearch-7.5.0 on Linux(SUSE)

I am trying to run ES on my server, and I got this error:

Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/tools/java_version_checker/JavaVersionChecker : Unsupported major.minor version 51.0
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClassCond(
	at java.lang.ClassLoader.defineClass(
	at Method)
	at java.lang.ClassLoader.loadClass(
	at sun.misc.Launcher$AppClassLoader.loadClass(
	at java.lang.ClassLoader.loadClass(
Could not find the main class:  Program will exit.

It seems that the issue is related to the java version, Could you please advise if I do something wrong or there a special configuration should be taken before running the ES?

Please note that we have the following JDK versions install in the server:

  • jdk1.7.0_25_32bit
  • jdk1.7.0_25_64bit
  • jdk1.7.0_72_32bit
  • jdk1.7.0_72_64bit
  • jdk1.8.0_74_64bit

you need a newer version of java (at least java 8) in order to run Elasticsearch

I have already java 8 in the server, the problem was the JVM is pointed to java 6, However, I have changed the $JAVA_HOME variable to the java 8 path, and it is working for me.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.