System: Ubuntu 10.04
Jdk:jdk-6u20-linux-i586.bin
Of course, I have downloaded the necessary JDK on the Sun's official website, because it is installed under Linux, and is different from the usual windows, specially recorded.
I. Installing the JDK
1. Installing the JDK
- sudo chmod u+x jdk-6u16-linux-i586.bin
- sudo cp-a jdk-6u20-linux-i586.bin/opt
- Sudo/opt/jdk-6u20-linux-i586.bin
- sudo rm-f/opt/jdk-6u20-linux-i586.bin
2. Setting the JDK environment variable
- sudo gedit/etc/profile
- Add code:
- #set Java Environment
- Export JAVA_HOME=/OPT/JDK1.6.0_20
- Export Jre_home= $JAVA _home/jre
- Export classpath= $CLASSPATH: $JAVA _home/lib: $JRE _home/lib
- Export path= $PATH: $JAVA _home/bin: $JRE _home/bin
- Save exit.
3. Rebooting the system
4. Test whether the installation is successful
- Java-version
- If the display
- 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)
- The installation succeeds.
Two. Uninstalling the JDK
1. Delete the JDK directory
- sudo rm-rf/opt/jdk1.6.0_20
2. Delete JDK Environment variables
- sudo gedit/etc/profile
- Delete code:
- #set Java Environment
- Export JAVA_HOME=/OPT/JDK1.6.0_20
- Export Jre_home= $JAVA _home/jre
- Export classpath= $CLASSPATH: $JAVA _home/lib: $JRE _home/lib
- Export path= $PATH: $JAVA _home/bin: $JRE _home/bin
- Save exit.
-
Top
-
0
-
Step
Java version Installation