...
Now it's time to link /etc/alternatives with our new installed JVM.
Anchor |
---|
| InstallCommandLine |
---|
| InstallCommandLine |
---|
|
Command LineUsually one has to install each java commands, tools or libraries one by one with the following interactive command:
...
Code Block |
---|
|
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/default-java/jre/bin/java" 1073; |
Check if your added JVM java command has been processed by running:
Code Block |
---|
|
user@machine:~$ update-alternatives --list java
/usr/lib/jvm/default-java/jre/bin/java
/usr/lib/jvm/java-8-openjdk-i386/jre/bin/java
/usr/lib/jvm/java-8-oracle/jre/bin/java
/usr/lib/jvm/ramdisk-java-8-oracle/jre/bin/java |
Anchor |
---|
| installDefaultJavaAlternatives.sh |
---|
| installDefaultJavaAlternatives.sh |
---|
|
...
Scripting
Doing this task one by one is pretty tedious, we provide a shell script ito facilitate the work.
...
Now it's time to unlink /etc/alternatives with the JVM we want to uninstall.
Anchor |
---|
| UninstallCommandLine |
---|
| UninstallCommandLine |
---|
|
Command LineUsually one has to uninstall each java commands, tools or libraries one by one with the following interactive command:
Code Block |
---|
|
sudo update-alternatives --remove "java" "/usr/lib/jvm/default-java/jre/bin/java"; |
Anchor |
---|
| removeDefaultJavaAlternatives.sh |
---|
| removeDefaultJavaAlternatives.sh |
---|
|
...
Scripting
Doing this task one by one is pretty tedious, we provide a shell script ito facilitate the work.
...