Jump to: navigation, search
(Created page with "=Migrating from Oracle Java 8 to OpenJDK 1.8.0= To upgrade Java, Open Java Runtime Environment (JRE) or Java Development Kit (JDK) RPM packages are recommended: * java-1.8.0-o...")
 
Line 40: Line 40:
  
 
After typing the command, press '''Enter''' to retain the current selection[+], or type selection number.
 
After typing the command, press '''Enter''' to retain the current selection[+], or type selection number.
 +
 +
In some cases, it might not possible to update the default Java on the node. Complications with other applications or circumstances might prevent a successful update. In this case, you can configure Web Services and Applications to use a specific Java version. Use the JAVA variable in the '''/etc/default/gws''' file. For example:
 +
<tt>
 +
# JAVA
 +
# defines the Java that have to be used if several versions are installed on the host.
 +
JAVA=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
 +
<tt>
 +
 +
[[Category:V:HTCC:8.5.2DRAFT]]

Revision as of 09:17, December 9, 2019

Migrating from Oracle Java 8 to OpenJDK 1.8.0

To upgrade Java, Open Java Runtime Environment (JRE) or Java Development Kit (JDK) RPM packages are recommended:

  • java-1.8.0-openjdk-headless
  • java-1.8.0-openjdk-devel

The RPM packages execute all necessary actions to install, configure Java, and update the operating system (OS) configuration. Web Services and Applications uses the default Java that is configured on the node. Therefore, if Oracle Java was installed previously using a Java RPM package, newly installed/updated OpenJDK should be selected as default one.

Invoke update-alternatives util and select the required java installation:

update-alternatives --config java

There are four programs that provide 'Java':

Selection

Command

1

/usr/lib/jvm/java/bin/java

2

/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java

3

/usr/java/jdk1.8.0_92/jre/bin/java

  • +4

/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java

After typing the command, press Enter to retain the current selection[+], or type selection number.

In some cases, it might not possible to update the default Java on the node. Complications with other applications or circumstances might prevent a successful update. In this case, you can configure Web Services and Applications to use a specific Java version. Use the JAVA variable in the /etc/default/gws file. For example:

  1. JAVA
  2. defines the Java that have to be used if several versions are installed on the host.

JAVA=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java

Comments or questions about this documentation? Contact us for support!