In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article introduces the relevant knowledge of "the method of installing java in Ubuntu14.04". Many people will encounter such a dilemma in the operation of actual cases, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!
JRE vs OpenJDK vs Oracle JDK
Before we move on to how to install Java, let's quickly understand the differences between JRE, OpenJDK, and Oracle JDK.
JRE (Java Runtime Environment), which is the environment you normally need to run an application based on the Java language. If you are not a programmer, this is enough for your needs.
JDK stands for Java development kit, and if you want to do some development (reading programs) about Java, this is exactly what you need.
OpenJDK is an open source implementation of the Java development kit, and Oracle JDK is the official Oracle version of the Java development kit. Although OpenJDK is sufficient for most cases, many programs such as Android Studio recommend using Oracle JDK to avoid UI/ performance problems.
Check to see if Java is installed on Ubuntu
Open the terminal and use the following command:
Java-version
If you see output like this, it means you don't have Java installed:
The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* openjdk-6-jre-headless
* gcj-4.5-jre-headless
* openjdk-7-jre-headless
Try: sudo apt-get install
Install Java on Ubuntu and Linux Mint
After looking at the differences between the various types of 'Java', let's see how to install them.
Install JRE on Ubuntu and Linux Mint
Open the terminal and install JRE using the following command:
Sudo apt-get install default-jre
Install OpenJDK on Ubuntu and Linux Mint
On the terminal, install the OpenJDK Java SDK using the following command:
Sudo apt-get install default-jdk
In particular, if you want to install Java 7 or Java 6, you can use openjdk-7-jdk/openjdk-6jdk, but remember to install openjdk-7-jre/openjdk-6-jre before that.
Install Oracle JDK on Ubuntu and Linux Mint
Use the following command to install, it only takes some time, it will download a lot of files, so you need to make sure your network environment is good:
Sudo add-apt-repository ppa:webupd8team/java
Sudo apt-get update
Sudo apt-get install oracle-java8-installer
Sudo apt-get install oracle-java8-set-default
If you want to install Java 7 (i.e Java 1.7), use java7 instead of java8 in the above command.
This is the end of the content of "how to install java in Ubuntu14.04". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!
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.