Install jdk on Ubuntu
2014-12-17 10:46
288 查看
This passage is from :http://ubuntuhandbook.org/index.php/2014/02/install-oracle-java-6-7-or-8-ubuntu-14-04/
This simple tutorial is going to show you how to easily install Oracle Java (JDK) 6, 7, or 8 in Ubuntu 14.04 Trusty Tahr via PPA.
There’s a Launchpad PPA (Personal Package Archive) maintained by webupd8.org, a popular Ubuntu Linux blog, which provides the most recent installers to automatically download and install Oracle Java JDK6 / JDK7 / JDK8 from
oracle website. Note there are no actual Java files in this PPA.
To get started:
Press Ctrl+Alt+T on your keyboard to open a terminal window. When it opens, copy and paste the command below and hit enter. Input your user password when prompts and it will add the PPA repository into your system.
After that, update package lists via:
To install Oracle Java 8, run:
Change the number 8 to 6 (or 7) in the code to install Java 6 (or 7).
While installation, you’ll be asked to agree the license and then the installer start downloading Java file from oracle website and install it on your system.
To set the default Java, run:
Also change number 8 to the Java version you want.
Finally check whether everyting is OK:
It will output something like below:
java version “1.7.0_60″
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
This simple tutorial is going to show you how to easily install Oracle Java (JDK) 6, 7, or 8 in Ubuntu 14.04 Trusty Tahr via PPA.
There’s a Launchpad PPA (Personal Package Archive) maintained by webupd8.org, a popular Ubuntu Linux blog, which provides the most recent installers to automatically download and install Oracle Java JDK6 / JDK7 / JDK8 from
oracle website. Note there are no actual Java files in this PPA.
To get started:
Press Ctrl+Alt+T on your keyboard to open a terminal window. When it opens, copy and paste the command below and hit enter. Input your user password when prompts and it will add the PPA repository into your system.
sudo add-apt-repository ppa:webupd8team/java
After that, update package lists via:
sudo apt-get update
To install Oracle Java 8, run:
sudo apt-get install oracle-java8-installer
Change the number 8 to 6 (or 7) in the code to install Java 6 (or 7).
While installation, you’ll be asked to agree the license and then the installer start downloading Java file from oracle website and install it on your system.
To set the default Java, run:
sudo apt-get install oracle-java8-set-default
Also change number 8 to the Java version you want.
Finally check whether everyting is OK:
java -version
It will output something like below:
java version “1.7.0_60″
Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
Java HotSpot(TM) 64-Bit Server VM (build 24.60-b09, mixed mode)
相关文章推荐
- how to install jdk on Ubuntu 11.04
- Ubuntu_ install JDK on Ubuntu 12.04
- Install JDK on Ubuntu
- how to install jdk on ubuntu
- install jdk on ubuntu 12.04
- Need to install sun java jdk on ubuntu
- How to Install Oracle Java JDK 6/7/8 on Ubuntu 13.04 / 12.10 / 12.04
- download and install the jdk1.8 on ubuntu14.4
- How to Install Oracle Java JDK on Ubuntu Linux
- How to install the Sun Java JDK on Ubuntu 10.10
- how to install the Oracle Java (JDK) 8, Oracle Java (JDK + JRE) 7 or Oracle Java (JDK) 6 on Ubuntu 1
- Install JDK on Ubuntu 11[转]
- How to Install Oracle Java JDK on Ubuntu Linux
- Install JDK on Ubuntu from scratch
- How to install the Sun Java JDK on Ubuntu 10.10
- install jdk on ubuntu 12.04
- install jdk on ubuntu
- How to Install JAVA 8 (JDK 8u91) on Ubuntu & LinuxMint via PPA
- How to install jdk on Ubuntu
- Install JDK on Ubuntu