Configure the default JDK version (to replace OPENJDK)
Open the terminal, just open it anywhere, and then execute the command in turn.
sudo update-alternatives--install /home/hsiung/javadev/bin /java
sudo update-alternatives--install /home/hsiung/javadev/bin /javac
sudo update-alternatives--install /home/hsiung/javadev/bin /jar
sudo update-alternatives--install /home/hsiung/javadev/bin /javah
sudo update-alternatives--install /home/hsiung/javadev/bin /javap
You only need to replace the path of the blue portion of the upper part of the bin directory under your JDK . Pay attention to one sentence of execution!
Finally, execute the command below:
sudo update-alternatives--config java
If you first install the JDK, you will be prompted
Thereis only one alternative in link Group Java (providing/usr/bin/java):/home/apples/javadevelop/jdk-7u21-linux-i586/ Bin/java
No configuration required.
For non-initial installation, there will be different versions of the JDK option.