Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 8: Line 8:
 
Invoke <tt>update-alternatives util</tt> and select the required Java installation:
 
Invoke <tt>update-alternatives util</tt> and select the required Java installation:
  
'''update-alternatives --config java'''
+
<source lang=javascript>
 +
update-alternatives --config java
 +
 +
There are 4 programs which 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
 +
 +
Enter to keep the current selection[+], or type selection number:</source>
  
There are four programs that provide 'Java':
+
In some cases, it might not be possible to update the default Java version 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:
  
{| border="1"
+
<source lang=javascript>
| width="94" valign="top" |
+
# JAVA
Selection
+
# defines the Java that have to be used if several versions are installed on the host.
| width="258" valign="top" |
 
Command
 
|-
 
| width="94" valign="top" |
 
1
 
| width="258" valign="top" |
 
<tt>/usr/lib/jvm/java/bin/java</tt>
 
|-
 
| width="94" valign="top" |
 
2
 
| width="258" valign="top" |
 
<tt>/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/bin/java</tt>
 
|-
 
| width="94" valign="top" |
 
3
 
| width="258" valign="top" |
 
<tt>/usr/java/jdk1.8.0_92/jre/bin/java</tt>
 
|-
 
| width="94" valign="top" |
 
<nowiki>*</nowiki>+4
 
| width="258" valign="top" |
 
<tt>/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java</tt>
 
|}
 
 
 
After typing the required command, press '''Enter''' to retain the current selection[+], or type the selection number.
 
 
 
In some cases, it might not be possible to update the default Java version 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>
 
<nowiki>#</nowiki> JAVA <br>
 
<nowiki>#</nowiki> defines the Java that have to be used if several versions are installed on the host. <br>
 
 
JAVA=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
 
JAVA=/usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
<tt>
+
</source>
  
 
[[Category:V:HTCC:8.5.2DRAFT]]
 
[[Category:V:HTCC:8.5.2DRAFT]]

Latest revision as of 11:13, December 12, 2019

Migrating from Oracle Java 8 to OpenJDK 1.8.0

To upgrade Java, the following 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 and configure Java, and update the operating system (OS) configuration. Web Services and Applications uses the default Java version that is configured on the node. Therefore, if Oracle Java was installed previously using a Java RPM package, the 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 4 programs which 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
 
Enter to keep the current selection[+], or type selection number:

In some cases, it might not be possible to update the default Java version 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:

# 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
This page was last edited on December 12, 2019, at 11:13.
Comments or questions about this documentation? Contact us for support!