Home > Java > Javagetting Started > body text

How to install jdk1.8 under linux system

王林
Release: 2019-11-25 17:02:03
forward
2223 people have browsed it

How to install jdk1.8 under linux system

1. First download jdk1.8 from the official website

2. jdk configuration

Edit the profile in the etc directory and enter sudo vim etc/profile

Recommended related video tutorials: java course

How to install jdk1.8 under linux system

Press Enter to get the following picture:

How to install jdk1.8 under linux system

3. Press i or insert to insert the following content at the end of the file

Note that you only need to change the path of Javah_home

#Java Env
export JAVA_HOME=/usr/jdk1.8.0_121
export CLASSPATH=.:JAVAHOME/lib/dt.jar:JAVA_HOME/lib/dt.jar:JAVA 
H
 OME/lib/dt.jar:JAVA_HOME/lib/tools.jar
export PATH=PATH:PATH:PATH:JAVA_HOME/bin
Copy after login

Get the following picture:

How to install jdk1.8 under linux system

##After inserting, press Esc to exit editing, enter: wq and press Enter

How to install jdk1.8 under linux system

4. Finally enter

Java -version to check whether it is configured properly

How to install jdk1.8 under linux system

Complete!

Recommended related articles:

java entry program

The above is the detailed content of How to install jdk1.8 under linux system. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:csdn.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!