Open the terminal in Ubuntu, execute the following command: sudoapt-getinstallsun-java6-jre is recommended to install a JDK: sudoapt-getinstallsun-java6-jdk # after installing jre do not install jdk or use the new software manager, search for "sun-java6-jre" and "sun-java6-jdk" respectively, tag the installation and apply. Tip: You need to answer the same question during the installation process
Open the terminal in Ubuntu and execute the following command:
Sudo apt-get install sun-java6-jre
We recommend that you install JDK:
Sudo apt-get install sun-java6-jdk # Do not install jdk after jre is installed
Or use the new software manager to search for "sun-java6-jre" and "sun-java6-jdk", tag the installation and apply, respectively.
Tip: During the installation process, you need to answer whether you agree to use the Protocol (the red-blue prompt page in the terminal). Press the tab key to OK, and press enter to install it normally.
Set the current default java interpreter:
Sudo update-alternatives -- config java
The following figure is displayed after execution:
There are two options available, both of which provide "java" <
Select option
1/usr/bin/gij-4.2
* + 2/usr/lib/jvm/java-6-sun/jre/bin/java
To maintain the default value *, press the Enter key or enter the selected number:
Enter the number before the row containing "sun. As shown above, enter 2 and press enter to confirm.
Install the browser's JAVA Plugin (optional ):
Sudo apt-get install sun-java6-plugin