Install Oracle Java 7 in Ubuntu via PPA
This package provides Oracle Java JDK 7 (which includes Java JDK, JRE and the Java browser plugin). However, you can't only install Oracle JRE - the PPA only provides the full Oracle JDK7 package.
To add our PPA and install the latest Oracle Java 7 in Ubuntu (supports Ubuntu 13.10, 13.04, 12.10, 12.04 and 10.04), use the commands below:
sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer
After the installation finishes, if you wish to see if it was successful, you can run the following command:
java -version
It should return something like this: java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
The package installs all the Java binaries, so you can also try "javac -version"which should return "javac 1.7.0_10"and so on (the "_10"part of the version can be different because I'm constantly updating the PPA with the latest Oracle Java 7 version).
The current JDK version in the PPA is Oracle Java 7 Update 10 (7u10).
If for some reason, the Java version in use is not 1.7.0, you can try to run the following command:
sudo update-java-alternatives -s java-7-oracle
Update: the installer now requires you accept the Oracle license before the installation begins. This is only required once. If for some reason you need the installation to be automated, you can run the following command to automatically accept the Oracle license:
sudo echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
Setting Java environment variables
To automatically set up the Java 7 environment variables, you can install the following package:
sudo apt-get install oracle-java7-set-default
If you've already installed
oracle-java6-set-default or
oracle-java8-set-default, they will be automatically removed when installing
oracle-java7-set-default (and the environment variables will be set for Oracle Java 7 instead).
Removing Oracle Java 7
If you don't want to use Oracle Java (JDK) 7 anymore and want to go back to OpenJDK, all you have to do is remove the Oracle JDK7 Installer and the previous Java (OpenJDK, etc.) version will be used:
sudo apt-get remove oracle-java7-installer
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.