In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you how to install linux jdk and set environment variables, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
1. View the number of linux bits
Check whether linux is 32-bit or 64-bit, which affects the version of JDK that needs to be downloaded
System digits jdk digits x86 (32 bits) 32 bits x86 bits 64 (64 bits)
32 bit
64 bit
Enter in the linux command:
Uname-a
If it is a 64-bit machine, it will output x86x64
two。 Download JDK
Download address: https://www.oracle.com/technetwork/java/javase/downloads/jdk11-downloads-5066655.html
Corresponding to step 1, download the 64-bit linx version
3. Install JDK
Upload the downloaded jdk to linux and extract the zip file
Tar-zxvf jdk-11.0.6_linux-x64_bin.tar.gz
4. Set environment variabl
Modify / etc/profile file
Vim / etc/profile, add the following:
Change export JAVA_HOME=/usr/local/jdk/jdk-11.0.6 # to the installation path export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jarexport PATH=$JAVA_HOME/bin:$PATH of jdk
Source / etc/profile enables environment variables to take effect
5. Test result
Enter the command in linux:
[root@localhost local] # java-versionjava version "11.0.6" 2020-01-14 LTSJava (TM) SE Runtime Environment 18.9 (build 11.0.6+8-LTS) Java HotSpot (TM) 64-Bit Server VM 18.9 (build 11.0.6+8-LTS, mixed mode)
The above result indicates that jdk is installed successfully.
What is Linux system Linux is a free-to-use and free-spread UNIX-like operating system, is a POSIX-based multi-user, multi-task, multi-threaded and multi-CPU operating system, using Linux can run major Unix tools, applications and network protocols.
These are all the contents of the article "how to install jdk and set environment variables in linux". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to 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.
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.