Upgrading Java and Elasticsearch


Well-known member
I'm currently running the latest version of XFES with XF 2.1.6-1, and all works well.

However, I'm running version 6.8.6 of the Elasticsearch engine, on top of Java 8.

I'd like to migrate to version 7.X of Elasticsearch, and also move to a more current (i.e. supported) version of Java, perhaps even Java 13.

I know that XFES is compatible with 7.X of the Elasticsearch engine, so good to go there.

A couple of questions.

1. Has anyone done an upgrade of Elasticsearch from version 6.X to 7.X?

2. And has anyone done an upgrade of the underlying Java environment from 8 to 11/12/13? Is XFES compatible with new(est) versions of Java?

3. Any pointers on doing so? Do folks recommend sticking with Oracle's JDK, or going with OpenJDK? Drawbacks or advantages of either?

4. If folks go with Oracle's JDK, would using it to power XFES/Elasticsearch be considered "personal use" under Oracle's 2019 Java license? I am not operating my forum for any commercial use, don't serve ads/profit from it, etc.

Thanks for any pointers, assistance, tips and/or info.



Well-known member
Following up on this for folks, if the issue comes up in the future.

My environment is currently Ubuntu 18.04.3, running XF 2.1.7, php 7.4.3:

When I recently updated my Elasticsearch 7.5.2 installation to 7.6.0, the system returned an error, noting that my current Java 8 installation would not work, and that a newer version of Java/JDK was required.

With Elasticsearch version 7.5.2 and below, you could use Java 8 and higher as the runtime environment. With ES 7.6.0 and higher, Java 11 or higher is seemingly required (at least, it was when I tried to update it on my forum).

This means that you must upgrade your Java environment (JDK) to Java 11 or higher. I did this by removing the Java 8 PPA from my Ubuntu list. It has not been updated since early 2019 anyway, because of Oracle’s licensing changes relating to Java. Java 11 is the latest LTS version of Java after Java 8, and Java 8 is no longer receiving updates from Oracle. I would not recommend using Java 9, 10 or 12, as they are not LTS (long-term supported) versions of Java/JDK.

I switched over to the OpenJDK environment and installed Java 11, by adding an appropriate PPA to my Ubuntu PPA list (also: see first command below). This works for Ubuntu, Debian and relates distros. Obviously things will be different for CentOS, RHEL and other non-Debian-based distros.

The commands to add the Java 11 OpenJDK PPA, and then to install Java 11, on Debian-based Linux distros, are:

add-apt-repository ppa:openjdk-r/ppa
apt-get update
apt install openjdk-11-jdk

The previous commands assume you are root. If not, please preface each command above with sudo

The URL that will appear in your PPA list to be checked with apt-get update && apt-get upgrade operations is:


After installing Java 11, and checking it with the command java -version you will find that ES 7.6.x will install just fine.

Screen Shot 2020-02-18 at 8.08.59 AM.jpg


Well-known member
Elasticsearch 7.6 comes bundled with it's own java version and will work fine in parallel with or using Java 8. Java 8 does also have the longest scheduled LTS support of all current java versions.

Not sure why you were getting that error. May have been an old Java 8 version?
  • Like
Reactions: rdn


Well-known member
It wasn't an error. It was just a message that came up on the screen during the Elasticsearch upgrade that said it required a higher version of Java, and it refused to continue the install/upgrade of ES. I was using Java 8 Update 201 previously.

Java 8 is now fairly old and while still supported ..... it was more than time to upgrade anyway. Even Java 11 has been out for a year and a half, and Oracle has released several versions (non-LTS) well beyond that.

DISCLAIMER: I work for Oracle, and closely with the Java product management team.


Well-known member
That is interesting because I'm running Elasticsearch 7.6 (using it's built in java, JAVA_HOME not specified in settings) in parallel with Java 8 update 201 with no issues on a dedicated server. Might be something in the install checking the previous setting for JAVA_HOME causing it to fail.

They still claim it's compatible with Java 8 (with no specifications on what version of 8):

I guess either way the important thing is you're up and running.


Well-known member
Yeah, I saw that support matrix (after the fact) and was surprised, given the very specific message that I received that stopped the install. It basically said that my version of Java was incompatible with Elasticsearch 7.6.0 and that I needed to upgrade.

After I did, I re-started the ES upgrade and it went fine. I wonder if it was one of the Java components that it didn't like. Maybe I'll send the ES folks a note and see what would have prompted that message.


Well-known member
I'm fairly sure there was a github issue about dropping Java 8 support for ES7, probably a documentation fault. And/or random backwards compatible breaking changes. Again.
Last edited:


Well-known member
I'm fairly sure there was a github issue about dropping Java 8 support for ES7, probably a documentation fault. And/or random backwards compatible breaking changes. Again.
Hey @Xon,

Today I upgraded from elasticsearch 7.6.0 to 7.6.1, and received this message. This is the same message I received earlier. So I mis-read it -- 7.6 is still working with Java 8, but they are warning that it won't in the future.

Although I'm running on Java 11, it looks like I haven't excised all of the old Java 8 files from my system.

Screen Shot 2020-03-04 at 11.54.38 AM.jpg