0.1 -- Download JAVAJDK: JDK
0.1 -- Download
Java jdk: http://www.oracle.com/technetwork/java/javase/downloads/index.html
Click download jdk. Here is the DOWNLOAD
Linux x64-Self Extracting Installer // jdk-6u31-linux-x64 // 81.62 MB
Download and save using FireFox
0.2 -- Installation
You need to create a directory: sudo mkdir jvm. The downloaded jdk is placed in the "download folder" under "Main folder"
Go to the/usr/lib/jvm directory and copy jdk to the current directory (if you cannot copy it directly, run the terminal command sudo cp jdk-6u31-linux-x64.bin/usr/lib/jvm ), run this terminal command in the "Download" folder.
Run the sudo chmod u + x jdk-6u31-linux-x64.bin to add executable permissions to JDK
Run sudo./jdk-6u31-linux-x64.bin to install JDK to the current directory
0.3 -- Configuration
Run sudo gedit/etc/environment to add the configuration.
PATH = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games: /usr/lib/jvm/jdk1.6.0 _ 31/bin"
CLASSPATH = ".:/usr/lib/jvm/jdk1.6.0 _ 31/bin/lib"
JAVA_HOME = "/usr/lib/jvm/jdk1.6.0 _ 31"
Sudo update-alternatives -- install/usr/bin/java/usr/lib/jvm/jdk1.6.0 _ 31bin/java 300
Sudo update-alternatives -- install/usr/bin/javac/usr/lib/jvm/jdk1.6.0 _ 31/bin/javac 300
Then sudo update-alternatives -- config java configuration preferences, and enter a number for selection.
Execute java-version to view
Java version "1.6.0 _ 31"
Java (TM) SE Runtime Environment (build 1.6.0 _ 31-b04)
Java HotSpot (TM) 64-Bit Server VM (build ipv6-b01, mixed mode)
The above information is displayed. OK
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2