Install jdk in Linux -- Jdk installation and Linux jdk Installation
One of the essential skills for Java software engineers: Install JDK in Linux
For programmers who choose to develop applications in Linux, installing Jdk in Linux is one of the essential technologies. Here, I used Ubuntu to demonstrate how to install JDK using command lines in Linux (the graphical interface is not taken into account !!!)
Step 1: Install a virtual machine
Step 2: Install Ubuntu
Step 3: Install JDK
Resource:
Ubuntu 10)
Linux ubuntu 2.6.35-22-generic # 33-Ubuntu SMP Sun Sep 19 20:34:50 UTC 2010 i686 GNU/Linux
Jdk1.7
Jdk-7u9-linux-i586.tar.gz
(1) jdk users generally like to regard it as a system application, so they generally like to create a new folder under/usr/-java is used to store the java installation path
Operation Command: sudo mkdir/usr/java
(2) mount the downloaded Jdk. (for resources to be mounted: Virtual Machine-> Settings-> options-> shared files always open-> Add resources to be mounted, finally, I mounted my jdk-7u9-linux-i586.tar.gz to the virtual machine/mnt/hgfs/resource that can be mounted.
(3) decompress the jdk-7u9-linux-i586.tar.gz and place it under the/usr/java directory and rename it JDK
Unzip command: sudo tar-zxvf-r jdk-7u9-linux-i586.tar.gz // usr/java
RENAME command: sudo mv jdk1.7.0 _ 09 jdk1.7
(4) Configure Environment Variables
Go to the configuration file vi/etc/profile.
Add a configuration file before umask 022
Export JAVA_HOME =/usr/java/jdk1.7
Export CLASSPATH =.: $ JAVA_HOME/jre/lib/rt. jar: $ JAVA_HOME/lib/dt. jar: $ JAVA_HOME/lib/tools. jar
Export PATH = $ PATH: $ JAVA_HOME/bin
Umask 022
(5) Finally, restart the client and enter java-version. The information displayed indicates that the client is successfully restarted.
Nagi @ ubuntu :~ $ Java-version
Java version "1.7.0 _ 09"
Java (TM) SE Runtime Environment (build 1.7.0 _ 09-b05)
Java HotSpot (TM) Client VM (build 23.5-b02, mixed mode)
Nagi @ ubuntu :~ $
To install oracle in linux, you do not need to install jdk.
No. You can view the requirements on the official website. Oracle10 is not required.
To install oracle in linux, you do not need to install jdk.
No. You can view the requirements on the official website. Oracle10 is not required.