In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
How to install JDK manually in UBUNTU? for this problem, this article introduces the corresponding analysis and solution in detail, hoping to help more partners who want to solve this problem to find a more simple and easy way.
Copy the extracted jdk1.7.0_04 folder to the / usr/lib/jvm directory with the highest permissions
Sudo cp-r ~ / jdk1.7.0_04/ / usr/lib/jvm/
Step2:
Configure environment variables
The copy code is as follows:
Sudo gedit / .profile
Add at the end:
The copy code is as follows:
Export JAVA_HOME=/usr/lib/jvm/jdk1.7.0_04 http://www.iis7.com/b/ssyqdq/
Then save it and update it with source.
$source ~ / .profile
Use the env command to see the value of JAVA_HOME
$env
If JAVA_HOME=/usr/lib/jvm/jdk1.7.0_04, the configuration is successful.
Step3:
The copy code is as follows:
Modify the default jdk of the system
$sudo update-alternatives-install / usr/bin/java java / usr/lib/jvm/jdk1.7.0_04/bin/java 300
Just enter the number before sun jdk.
The copy code is as follows:
$sudo update-alternatives-install / usr/bin/javac javac / usr/lib/jvm/jdk1.7.0_04/bin/javac 300
$sudo update-alternatives-config java
$sudo update-alternatives-config javac
Step4:
Then type java-version. When you see the following message, it will be changed to jdk of sun:
Java version "1.7.0804"
Java ™SE Runtime Environment (build 1.7.0_04-b20)
Java HotSpot ™Server VM (build 23.0-b21, mixed mode)
Possible problems:
1. Indicates that the missing libjli.so cannot be started. When you encounter this problem, the JavaJDK package you downloaded is incomplete, or your decompression method is incorrect, so extract it directly to the current path, and then copy it to the directory you need. You can choose the installation directory of JDK, for example, you can put it in the HOME directory.
The libjli.so file is located at: ~ / jdk1.7.0_07/jre/lib/i386/jli/libjli.so
two。 May not be able to configure successfully, you need to uninstall the previously installed OpenJDK. You can remove it from the command line.
3. For different versions of JDK, you can modify the version number as above
This is the answer to the question about how to manually install JDK in UBUNTU. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel for more related knowledge.
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.