My Linux uses a virtual environment built by VMware, using the CENTOS6.5
First, the preparatory work:
1, to determine the system installed is successful.
2, the system no other problems
3. Make sure no other version of JDK is installed, two JDK will recoil
command to see if you have another version of the Java JDK
Command: Java-version view the Linux version of the current system
or Javac.
Pop up such a hint document that your machine has a configured JDK
Otherwise it will error command not found
Second, the configuration
1, to ensure that they are administrator rights
Use the PWD command to view your current location and, when displayed, prove that you are in the/root directory.
Because I am using the remote Client tool to do the connection, so I demonstrate the use of this tool, connection setup see VMware + LInux + Xshell Connection Environment settings (experience)-North Max Penguin-Blog Park http://www.cnblogs.com/ Liuyangfirst/p/6030411.html or Baidu under Xshell How to connect Linux system
Attention:
1, if the use of SECURECRT, then the CentOS system, the implementation of the Yum command
Yum Install Lrzsz
2, the implementation of RZ
Will implement the same situation as below, pop up a dialog box
2, the use of the Xshell Remote Terminal Connection tool (Point-open icon)
3, after the opening, (on the left is your machine (current system), the right side of your connected Street Linux system)
4. Then drag and drop the JDK you want to move to the box on the right (create a download folder here, the same here)
5, here must choose JDK version, do not choose JRE, or later will be wrong
6. Go to the root directory to view the established folders (folder establishment mkdir Download)
7. View your JDK (CD into the directory, then LS to view the file)
8, I generally unzip the file in the/usr/local/file, the command is to copy the file to the/usr/local/file, execute, no response, do not put the name of the folder wrong, there is no error, if the name is wrong, the system will give you to create a wrong name of the folder
9, enter the USR,CD command, and then see the red Circle part is the command succeeded
10, for the JDK decompression./jdk-6u45-linux-x64.bin
The error will be found here, so we have to give it a permission first.
11, decompression in
Pop up a bunch of compressed packets and the decompression instructions are successful.
12. Successful Decompression
13. Create a Folder
14, the filename is too long, we change it to a name, is to change the success
14. View the configuration document (this is equivalent to the Windows system path environment variable configuration)
15, the/etc/profile file for editing use Vi/vim
16, after entering, press the letter I of the keyboard, enter the editing mode
17, add two sentences (here to use JDK1, if your 14th, with the JDK, here is the JDK JDK)
18. Press ESC to exit, then press shift+ at the same time:
19. Enter Wq (save and Exit command), then return
20. Test whether the configuration is successful
Two commands are good, the configuration is successful.
Linux configuration jdk (Mac and Windows)