search
Homephp教程PHP开发Install JDK on Linux system

Install JDK on Linux system

Nov 15, 2016 pm 03:01 PM

1. Upload the JDK installation package to the Linux server
Use the FileZilla tool to upload the jdk Linux installation package to any directory on the server

Install JDK on Linux system

2. Use the SecureCRT tool to connect to the Linux server
Use the SecureCRT tool to connect to the server, and use ls and cd Command to enter the directory where the jdk installation package is located

Install JDK on Linux system

3. Decompress the JDK installation package
Use the tar -zxvf command to decompress the jdk installation package. The command is as follows:
tar -zxvf The full name of the compressed file
tar -zxvf jdk-8u111 -linux-x64.tar.gz

Install JDK on Linux system

4. Enter the system environment variable configuration file
Use the vim /etc/profile command to enter the system environment variable configuration file

Install JDK on Linux system

5. Add JDK environment variables on the Linux server
Press i to enter edit insert mode and add the following code at the bottom
JAVA_HOME=JDK installation directory
JRE_HOME=JDK installation directory/jre
CLASSPATH=$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$JAVA_HOME/bin :$PATH
export PATH CLASSPATH JAVA_HOME
In this example, the JDK installation directory is as follows
JAVA_HOME=/home/zc/programstudio/jdk1.8.0_111
JRE_HOME=/home/zc/programstudio/jdk1.8.0_111/jre
CLASSPATH =$JAVA_HOME/lib:$JAVA_HOME/jre/lib
PATH=$JAVA_HOME/bin:$PATH
export PATH CLASSPATH JAVA_HOME
After adding it, press the ESC key to exit the edit insertion mode

Install JDK on Linux system

Then enter the following command: wq and press Enter to exit the edit mode

6. Make the configuration file take effect immediately
Use the source /etc/profile command to make the environment variable configuration just take effect immediately

Install JDK on Linux system

7. Verify whether the installation is complete

Use java -version Command to verify whether the environment variables are configured

Install JDK on Linux system

Statement
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

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft

SublimeText3 Linux new version

SublimeText3 Linux new version

SublimeText3 Linux latest version