# Analysis-icu Plugin won't install

**URL:** https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698
**Category:** Elasticsearch
**Created:** [November 2, 2016, 10:28am UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698 "2016-11-02T10:28:13Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![Palandos](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Palandos](https://discuss.elastic.co/u/Palandos)
#### Post date: [November 2, 2016, 10:28am UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/1 "2016-11-02T10:28:14Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 2, 2016, 10:44am UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/2 "2016-11-02T10:44:58Z")

</div>

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.

---

<div class="post-metadata">

### Author: ![Palandos](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Palandos](https://discuss.elastic.co/u/Palandos)
#### Post date: [November 2, 2016, 10:56am UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/3 "2016-11-02T10:56:15Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 2, 2016, 11:10am UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/4 "2016-11-02T11:10:00Z")

</div>

Windows or Linux?

We are basically using this script: [https://github.com/elastic/elasticsearch/blob/5.0/distribution/src/main/resources/bin/elasticsearch-plugin](https://github.com/elastic/elasticsearch/blob/5.0/distribution/src/main/resources/bin/elasticsearch-plugin)

So check:

- `$JAVA_HOME`
- and if not set what gives `which java`

---

<div class="post-metadata">

### Author: ![Palandos](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Palandos](https://discuss.elastic.co/u/Palandos)
#### Post date: [November 2, 2016, 11:44am UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/5 "2016-11-02T11:44:16Z")

</div>

I am working on Linux.

The execution of

- **echo $JAVA\_HOME** returns **/opt/java8**  
and
- **which java** returns **/opt/java8/bin/java**

**EDIT:**  
I've downloaded and extracted the .zip that is also referenced in the documentation  
[https://www.elastic.co/guide/en/elasticsearch/plugins/5.0/analysis-icu.html](https://www.elastic.co/guide/en/elasticsearch/plugins/5.0/analysis-icu.html)  
into the plugins folder and it works fine.

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 2, 2016, 12:07pm UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/6 "2016-11-02T12:07:03Z")

</div>

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

What if?

```auto
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.

---

<div class="post-metadata">

### Author: ![Palandos](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Palandos](https://discuss.elastic.co/u/Palandos)
#### Post date: [November 2, 2016, 12:23pm UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/7 "2016-11-02T12:23:25Z")

</div>

> [@dadoonet](#):
>
> sudo echo $JAVA\_HOME  
> sudo which java

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

- /usr/bin/java

---

<div class="post-metadata">

### Author: ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)
#### Post date: [November 2, 2016, 12:37pm UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/8 "2016-11-02T12:37:52Z")

</div>

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`?

---

<div class="post-metadata">

### Author: ![Palandos](https://avatars.discourse-cdn.com/v4/letter/p/46a35a/32.png) [@Palandos](https://discuss.elastic.co/u/Palandos)
#### Post date: [November 2, 2016, 12:59pm UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/9 "2016-11-02T12:59:46Z")

</div>

> [@dadoonet](#):
>
> I believe that if you run /usr/bin/java -version you will have a Java7 result?

Exactly that is the result 😉

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

Cheers for all the help, keep it up 🙂

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [July 5, 2017, 10:07pm UTC](https://discuss.elastic.co/t/analysis-icu-plugin-wont-install/64698/10 "2017-07-05T22:07:24Z")

</div>


