trying to install the ICU-Plugin in elasticsearch 5.0.0 with the command given in the documentation (sudo bin/elasticsearch-plugin install analysis-icu) and get the following stack trace:
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/elasticsearch/plugins/PluginCli : Unsupported major.minor version 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
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)
Is it that elasticsearch5.0.0 is running with JAVA8 and the plugin doesn't support that?
on java -version I get the following:
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)
I think that echo $JAVA_HOME is evaluated here before sudoing.
Whatever we can see that the root user is not aware of your Java8 install. This is my guess. I believe that if you run /usr/bin/java -version you will have a Java7 result?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.