installing Java in Ubuntu 14.04
want to know How to install Java in Ubuntu 14.04 ? Installing Java is definitely one of the first things to do after installing Ubuntu 14.04 , and it's easy.
Many people hate Java, but there's a good chance you'll need to install Java for some reason, even if you hate it. In this article, we'll show you how to install Java in Ubuntu 14.04 (and possibly the same for Linux Mint 17).
JRE vs OpenJDK vs Oracle JDK
Before we continue to learn how to install Java, let's get a quick look at the differences between JRE, OPENJDK, and Oracle JDK.
· JRE (Java Runtime Environment), which is the environment you need to run a Java-language-based application normally. If you are not a program clerk, these are enough for your needs.
· The JDK represents the Java SDK, and if you want to do something about Java development (read programs), that's exactly what you need.
· OpenJDK is an open source implementation of the Java SDK, the 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 issues.
Check to see if Java is installed on Ubuntu
To open the terminal, use the following command:
1. Java-version
If you see output like the following, this means that you have not installed Java:
1. The program ' Java ' Can is found in the following packages:
2. * DEFAULT-JRE
3. * Gcj-4.6-jre-headless
4. * Openjdk-6-jre-headless
5. * Gcj-4.5-jre-headless
6. * Openjdk-7-jre-headless
7. try: sudo apt-get install
install Java on Ubuntu and Linux Mint
After looking at the different types of ' Java ', let's look at how to install them.
First, install the appropriate repository support
sudo apt-get install Git-core GnuPG Flex Bison gperf build-essential Zip curl Zlib1g-dev
Gcc-multilib g++-multiliblibc6-dev-i386 Lib32ncurses5-dev ia32-libs X11proto-core-dev
Libx11-dev Lib32readline5-dev Lib32z-de
Manual InstallationJAVA
Website:
Http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase6-419409.html#jdk-6u45-oth-JPR
Here we download the Jdk-6u45-linux-x64.bin
We put the file in the/HOME/USER/JDK directory
Note: User is the working directory and you can create it according to your actual directory.
Increase execution Permissions chmod +x jdk-6u45-linux-x64.bin
Execute the file for installation./jdk-6u45-linux-x64.bin, in the installation decompression process, if prompted yes/on, please enter y return.
After the installation is complete, modify the environment variable BASHRC or. Profile
Export java_home=/home/user/jdk1.6.0_45/
Export path= $JAVA _home/bin: $PATH
Export Classpath= $JAVA _home
in Ubuntuautomaticallyinstallation
Open the terminal and install the JRE using the following command:
1. sudo apt-get install Default-jre
install OPENJDK on Ubuntu and Linux Mint
At the terminal, install the OPENJDK Java SDK using the following command:
1. sudo apt-get install DEFAULT-JDK
Specifically, 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.
install Oracle JDK on Ubuntu and on
Use the following command to install, just some time, it will download a lot of files, and you want to make sure that your network environment is good:
1. Sudo add-apt-repository Ppa:webupd8team/java
2. sudo apt-get update
3. sudo apt-get install Oracle-java8-installer
4. 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 command above.
Installing Java in ubuntu14.04