Analysis-icu Plugin won't install

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(
at Method)
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
at sun.launcher.LauncherHelper.checkAndLoadMain(

Is it that elasticsearch5.0.0 is running with JAVA8 and the plugin doesn't support that?

Please format your code using </> icon. It will make your post more readable.

Your config is probably wrong or something is not working as expected with the elasticsearch-plugin script.

What gives java -version?

You must have Java8 for sure.

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)

What would I have to look for in the config?

Windows or Linux?

We are basically using this script:

So check:

  • and if not set what gives which java

I am working on Linux.

The execution of

  • echo $JAVA_HOME returns /opt/java8
  • which java returns /opt/java8/bin/java

I've downloaded and extracted the .zip that is also referenced in the documentation
into the plugins folder and it works fine.

Oh? I did not notice but you are using sudo.
So may be your root user does not have the right things.

What if?

sudo echo $JAVA_HOME
sudo which java

The manual thing can work yes but TBH I don't like it. It's hiding something wrong here.

The $JAVA_HOME Variable returns the same when i run it with sudo but "sudo which java" now returns

  • /usr/bin/java

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?

Can you install the plugin without sudo?

Exactly that is the result :wink:

And I am able to install it via commandline when I drop the sudo.

Cheers for all the help, keep it up :slight_smile: