In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
1. Go to the official website to download the corresponding version of the installation package, 64-bit system corresponding to 64-bit installation package
two。
3. Move the installation package to the new jdk directory and unzip it to get the directory jdk1.8.0_161
4. When it's time to configure the environment variables, use sudo gedit / etc/environment, open the file, and add
PATH= "/ usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:$JAVA_HOME/bin" export CLASSPATH=.:$JAVA_HOME/lib:$JAVA_HOME/jre/libexport JAVA_HOME=/usr/lib/jdk/jdk1.8.0_161
5. After modification, use the command source / etc/environment to make the modified configuration take effect immediately.
If the 6.java-version view shows the jdk version information, the configuration is successful.
7. Then modify the environment variables of all users, sudo gedit / etc/profile, and add at the end
# set Java environmentexport JAVA_HOME=/usr/lib/jdk/jdk1.8.0_161export JRE_HOME=$JAVA_HOME/jreexport CLASSPATH=.:$JAVA_HOME/lib:$JRE_HOME/lib:$CLASSPATHexport PATH=$JAVA_HOME/bin:$JRE_HOME/bin:$PATH
8. Use the command source / etc/profile to make the configuration effective
9.java-version verification
Let's take a look at the JDK1.8 environment variable configuration
Create new user variables: JAVA_HOME, CLASSPATH, and system Path
Variable name: JAVA_HOME
Variable value: C:\ Program Files\ Java\ jdk1.8.0_102
Variable name: CLASSPATH
Variable value:.;% JAVA_HOME%\ lib\ dt.jar;%JAVA_HOME%\ lib\ tools.jar
Variable name: Path
Variable value: C:\ Program Files\ Java\ jdk1.8.0_102\ bin;C:\ Program Files\ Java\ jdk1.8.0_102\ jre\ bin
Test whether the environment variable configuration is successful.
Summary
The above is the tutorial of installing jdk1.8 and configuring environment variables under Linux introduced by the editor. I hope it will be helpful to you. If you have any questions, please leave me a message and the editor will reply to you in time. Thank you very much for your support to the website!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.