Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install and configure jdk1.7 under linux

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

In this article, the editor introduces in detail "how to install and configure jdk1.7 under linux". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to install and configure jdk1.7 under linux" can help you solve your doubts.

0) go to the official website and drop down at jdk

Wget http://download.oracle.com/otn-pub/java/jdk/7/jdk-7-linux-x64.tar.gz-O jdk-7-linux-x64.tar.gz

1) installation

Tar-zxvf jdk-7-linux-x64.tar.gz

2) move to the specified directory. The reason for using a soft connection below is to facilitate future upgrades.

Mv jdk1.7.0 / Application/

Ln-s / Application/jdk1.7.0 / Application/java

Ln-s / Application/java/bin/java / sbin/java

3) set environment variables

Echo "export JAVA_HOME=/Application/java" > / etc/profile.d/java_env.sh echo "export JRE_HOME=/Application/java/jre" > > / etc/profile.d/java_env.sh

Echo "export CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATH" > > / etc/profile.d/java_env.sh

Echo "export PATH=.:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH" > > / etc/profile.d/java_env.sh

Set to an executable file

Chmod + x / etc/profile.d/java_env.sh

Make the environment variable take effect on the current ssh client

Source / etc/profile.d/java_env.sh

4) Verification

It is better to delete the previous java.

Root@vs-3310-099:/Application/java# java-version java version "1.7.0" Java (TM) SE Runtime Environment (build 1.7.0-b147) Java HotSpot (TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

End

After reading this, the article "how to install and configure jdk1.7 under linux" has been introduced. If you want to master the knowledge of this article, you still need to practice and use it yourself. If you want to know more about the article, please follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report