Memory and. rpm
Web: http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html
Step 2: Decompress the package to a folder. the Linux environment uses environment variables, so there is no problem with the unzipping. The key is to configure the environment variables later.
Copy jdk-7u4-linux-i586.tar.gz to the/usr/lib/JVM/directory. If no JVM folder exists, create the folder. Run the following command:
Sudo mkdir JVM // create a folder JVM
Sudo CP-R ~ /Download/jdk-7u4-linux-i586.tar.gz/usr/lib/JVM
// Copy the downloaded file to the directory created in the heart
Sudo tar-zxvf jdk-7u4-linux-i586.tar.gz // Extract files
Step 3: Configure Environment Variables
Sudo gedit/etc/profile
Add the following at the end of the file:
Export java_home =/usr/lib/JVM/jdk1.7.0 _ 07
Export Path = $ java_home/bin: $ java_home/JRE/bin: $ path
Export classpath = $ classpath:.: $ java_home/lib: $ java_home/JRE/lib
When configuring path and classpath, you must add the original path and classpath, as shown above.
After the environment variables are configured, You can restart. The simpler method is source/etc/profile.
Finally, use javac and Java to check whether the environment variables are successfully installed.