Install JDK1.8 under Ubuntu Kylin, the reference address is: http://jingyan.baidu.com/article/647f0115bb26817f2048a871.html, in addition to referring to it, the steps are as follows:
Note: I placed jdk in the /opt/duan/ directory
The following steps 1~6 are all operated by ordinary users
1、 First download the JDK for linux, not to mention the specific download process.
2、 Unzip and copy the jdk to the /opt/duan directory: tar zxvf jdk1.8...-linux-64...tar.gz -C /opt/duan
3、 Switch the shell current directory to /opt/duan, modify the name of the jdk folder: mv jdk1.8.0_05 jdk1.8
4、 gedit /home/duan/.bashrc (note that duan is my username)
5、 Write the content shown in the figure below into the file:
6、5 After the steps, save the file, close the file, and then enter java -version in the shell to see the jdk version.
Note: Although the operation done in the above steps, although the JDK is installed, the jdk can only be seen by the user duan, as if other users cannot see it, even the root user does not seem to see the jdk (you can view it this way : Under the root user, enter java -version in the shell to see if there are any results).
Next, install the JDK under the root user:
1、 Switch to the root user.
2、 After executing gedit /etc/profile, write the content in the following figure to the file:
3、 Save the file after step 2 and close the file.
4、 Exit the root user (it seems to exit first, or enter java directly in the shell, it seems that you will be prompted to find the java command), then switch to the root user, execute java -veriosn in the shell, and you can see the jdk version Up.
( adsbygoogle = window.adsbygoogle || []).push({});
Recommended Posts