This article describes how to install JDK 1.61 in Ubuntu, first go here to download the JDK 1.6linux version, I download is the latest jdk-6u20-linux-i586.bin; if there is no dedicated download tool, after being downloaded using firefox, it will be saved in/home/username/download /.. .; 2. Copy or cut the jdk-6u20-linux-i586.bin to/home/username /...
This article describes how to install JDK in Ubuntu
1. First download the JDK1.6 Linux version here, I download the latest jdk-6u20-linux-i586.bin; if there is no dedicated download tool, after being downloaded using firefox, it will be saved in/home/username/download /.. .;
2, copy or cut the jdk-6u20-linux-i586.bin to/home/username/...; (because I am a lazy, too lazy Chinese folder name );
3. Start the terminal: Enter the command sudo-s./jdk-6u20-linux-i586.bin;
4. Press enter all the way until you ask whether to install the SDK. If yes/no is displayed, enter yes/y to press Enter;
5. After the preceding operation is complete, configure JDK. Enter the sudo gedit/etc/profile command and paste the following information in the last line of the pop-up file:
Configuration code
# Set java environment
# Note that bestupon should be replaced with your user name
JAVA_HOME =/home/bestupon/jdk1.6.0 _ 20
Export JRE_HOME =/home/bestupon/jdk1.6.0 _ 20/jre
Export CLASSPATH =.: $ JAVA_HOME/lib: $ JRE_HOME/lib: $ CLASSPATH
Export PATH = $ JAVA_HOME/bin: $ JRE_HOME/bin: $ PATH
# Set java environment
6. After restarting your host, enter the following information in the terminal: java-version, indicating that the installation configuration is correct.
Terminal code
Bestupon @ bestupon-laptop :~ $ Java-version
Java version "1.6.0 _ 20"
Java (TM) SE Runtime Environment (build 1.6.0 _ 20-b02)
Java HotSpot (TM) Server VM (build 16.3-b01, mixed mode)
Bestupon @ bestupon-laptop :~ $