How to replace Oracle JRE/JDK with OpenJDK
Description

As you may have read or been warned of, Oracle Java Runtime Environment (JRE) or Java Development Kit (JDK) versions from April 2019 are subject to commercial licensing for usage on production systems. This may be different on non-production or development environment, look at the relevant Oracle literature to determine if a license is needed.

This means that if you want to update Oracle’s JRE or JDK used on Sage X3/EM environments to any version released from April 2019, you should get a (paying) license from Oracle. For Java 8 that is normally used on Sage X3/EM environments, any update of JRE or JDK to 8u211 (released in April 2019) or later is subject to licensing fees from Oracle (in a Subscription model).
For more information on this you may browse to the following URLs:

The Sage X3 Online help will soon be updated with the instructions to replace Oracle JDK/JRE with OpenJDK, however at this date this is not yet available. This note provides a summary for you to use until this online help is available

Cause

Resolution
[BCB:1:Backup warning:ECB]

There are two areas of concern for your Sage X3 installation:

1. JDK which is bundled with (and installed by) a Sage X3 component, such as :
- Print Server, Java Bridge, Classic Web/ADC Server

For these embedded JDK components, you cannot manually upgrade the JDK and need a patch from Sage in order to upgrade:
- Print Server 2.16 and later now have OpenJDK embedded
- ADC Web Server 2.38 and later now have OpenJDK embedded
- Java Bridge has not been updated yet and a decision is due soon (as it has been deprecated a long time)


2. The JDK version that is installed independantly from your Sage X3 in order for it to work. This is a seperate "standard" JRE/JDK installation and is used for certain functionality such as :
- Sage X3 installations and Technology component upgrades
- Elastic Search

For the standalone JDK installation:
- Only Java 8 is certified, as shown in the V12 compatibility matrix (http://online-help.sageerpx3.com/erp/12/wp-static-content/static-pages/en_US/v7dev/prerequisites_overview.html) so you are firmly recomended to install and use this verion only, Whilst the latest OpenJDK version seems to work OK, you will find potential issues, such as the MongoDB version 4 installer will not complete as it has a dependancy on JDK 8
- Elasticsearch certification is listed at https://www.elastic.co/support/matrix#matrix_jvm As per this information, you can use OpenJDK 8 or 10 with the Elastic Search version 6.4+

To update JRE version for Elastic Search, prior to version 6.4
Shutdown Elastic Search
Install the appropriate OpenJDK version
In the Elastic Search directory e.g. C:\Sage\FreeComponents\X3ERPV11ELASVR
a. Run the "servicedelete.cmd" which will remove the existing Elastic Search service
b. Edit the "servicecreate.cmd" to modify the JDK_PATH
c. Run the "servicecreate.cmd" with the "as administrator" option to create the service with the new JDK_PATH

You may also need to check/edit the JAVA_HOME system environment variable


DocLink: Additional notes when upgrading ElasticSearch

Steps to duplicate
Related Solutions