Because Linux software installation requires the use of commands, many people encountered a lot of problems when installing java, the following small series Ubuntu14.04 as an example, give you a detailed introduction to java The installation, let's learn together.
JRE vs OpenJDK vs Oracle JDK
As we continue to learn how to install Java before, let us quickly understand the differences between the JRE, OpenJDK and Oracle JDK.
JRE (Java Runtime Environment), which is the environment you normally need to run a Java-based application. If you are not a programmer, these are enough for your needs.
JDK stands for Java Development Kit, and if you want to do some Java development (reader), this is exactly what you need.
OpenJDK is an open source implementation of the Java Development Kit, the official Oracle version of the Java Development Kit. Although OpenJDK is sufficient for most cases, many programs such as Android Studio recommend using the Oracle JDK to avoid UI/performance issues.
Check if Java is already installed on Ubuntu
To open the terminal, use the following command:
java -version
If you see something like the following Output, which means you have not installed Java:
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< Br>
Try: sudo apt-get install
Installing Java on Ubuntu and Linux Mint
After reading the various types & lsquo;Java’, let’s see how to install they.
Installing JRE on Ubuntu and Linux Mint
To open a terminal, use the following command to install JRE:
sudo apt-get install default-jre
Install OpenJDK on Ubuntu and Linux Mint
In the terminal, install the OpenJDK Java Development Kit using the following command:
sudo apt-get install default-jdk
If you want to install Java 7 or Java 6 and so on, you can use openjdk-7-jdk/openjdk-6jdk, but remember to install openjdk-7-jre/openjdk-6-jre before this.
Installing Oracle JDK on Ubuntu and Linux Mint
Use the following command to install it. It only takes a few moments, it will download a lot of files, and you have 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 (ie Java 1.7), use java7 instead of java8 in the above command.
The above is the introduction of Ubuntu14.04 java method, as for other versions of Linux to install java method and the method described in this article is somewhat similar, refer to the method of this article to install.
In Linux system operation, if there is too much data in the file, it is very troubl
In order to develop J2ee, you need to build the j2ee development environment first.
Learning to use a Linux system is actually a process of mastering many commands, bu
We often download some compressed files online, so compression and decompression ar
How to generate reports using Linux using the Sosreport command
How to install and configure Salt
Linux does not extract compressed files, how to directly view a file size
Linux detection and mounting the second hard disk step
Handling of the Segmentation fault error in Linux programming
Detailed usage of nl commands under Linux
Linux when the program is prompted to error while loading shared?
How to set Linux commands as keyboard shortcuts
Linux System Process Management Introduction
Introduction to the Linux file system
What if your Windows system crashes? 6 strokes to fix Windows
Do not ask for Windows XP Personality CD to do it yourself
Problems with installing small input methods under centos
Microsoft® Deployment Toolkit 2010 for rapid deployment of Windows
LOL Captain Planck BUG has been repaired. The full release of the
How to delete Windows7 system. OLD dynamic file
Win10 is not compatible with the third-party input method
Win10 preview version 9901 new UI introduction