![]() ![]() This file is not a script, but rather a small text document as a quick reminder of what each script in the directory does.All new terminals and shells after this will default to the system Java (currently OpenJDK 11). This script removes the changes made by the other scripts in this directory from your bashrc file.opt/java-selection/system-default-java.bash: ![]() This script changes your Java version to OpenJDK Java 11 in your current terminal/shell, and all future terminals and shells.opt/java-selection/openjdk-java-11.bash: This script changes your Java version to Oracle Java 8 in your current terminal/shell, and all future terminals and shells.This script changes your Java version to OpenJDK Java 8 in your current terminal/shell, and all future terminals and shells.The script locations are listed below, with details on what each does. Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode) Java(TM) SE Runtime Environment (build 1.8.0_181-b13) Java now set to Oracle Java ~]$ java -version OpenJDK 64-Bit Server VM 18.9 (build 11.0.11+9-LTS, mixed mode, ~]$ source /opt/java-selection/oracle-java-8.bash OpenJDK Runtime Environment 18.9 (build 11.0.11+9-LTS) In order for the changes to propagate beyond the shell that the script is sourced in the user must log out and log back into their session. For example, the following command activates OpenJDK Java 8: source /opt/java-selection/openjdk-java-8.bash. In order to activate these scripts, simply run the command 'source $SCRIPT', where "$SCRIPT" is the location of the script, and then log out and back in. You can find the scripts at '/opt/java-selection/'. This change is persistent across all fully managed machines, logins, and reboots. If you have not manually changed this, then you are using bash, and these scripts will work as intended. This change is not retroactive, so it will not work on shells and terminals already open (except for the one you sourced the script from). These scripts are designed to modify your local bashrc profile (located at '$HOME/.bashrc') so that any new bash spawning terminals or bash shells you start will make your default Java run with the selected version as well as the shell you sourced the script from. Bash is the default shell. ![]() You can change your own Java version to what you need, as the Linux Lab image contains multiple versions of Java. All fully managed Red Hat Enterprise Linux systems run a certain Java version as the default. ![]()
0 Comments
Leave a Reply. |