How to install the jdk

  
you want under Linux

How to install the jdk you want under Linux? Last time we talked about how to uninstall the jdk that comes with it on Linux. If you uninstall it, we want to install the jdk that we want. then what should we do? Xiaobian this episode will tell you how to install the desired jdk under Linux.

Install the jdk you want under Linux:

Tools:

CentOs6.x this version of linux system

jdk, download URL: http: //www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html, select the version you need to download

The following installation is demonstrated with the rpm package, so please download Rpm package file.

Steps:

1: Drag the download rpm package into the linux system and enter the corresponding directory to execute: rpm -ivh jdk-7u51-linux-x64.rpm:

2: After installation, configure environment variables: execute the vi /etc/profile command and add the configuration information as shown below. Note: The directory should be written in your own installation directory, generally installed by default under /usr/java.

3: If you don't want to re-system, you can use the command source /etc/profile to make the configuration file take effect immediately. Otherwise, you can only restart the system for the configuration parameters to take effect. Then we can view the configuration information by echo $JAVA_HOME ;echo $PATH;echo $CLASSPATH .

4: Finally, we pass again: java -version to see if we have successfully installed jdk.

Remember to operate under the user with root privileges. Commonly we execute the :su - root command, and then enter the password of the root user to get root privileges. This is how to install the jdk tutorial
you want under Linux.

Copyright © Windows knowledge All Rights Reserved