Install Oracle Java 7 in Ubuntu via PPA
来源:互联网 发布:php 仿京东商城源代码 编辑:程序博客网 时间:2024/06/04 23:37
nstall 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/javasudo apt-get updatesudo 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 installingoracle-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
- install oracle java 7 in ubuntu via ppa
- Install Oracle Java 7 in Ubuntu via PPA
- Install Oracle Java8 in Ubuntu via ppa
- Ubuntu 装配 Sublime Text 3 及破解方法 Install Sublime Text 3 in Ubuntu via PPA
- Ubuntu 安装 Sublime Text 3 及破解方法 Install Sublime Text 3 in Ubuntu via PPA
- Ubuntu 安装 Sublime Text 3 及破解方法 Install Sublime Text 3 in Ubuntu via PPA
- How to Install Wine 1.8 Stable via New PPA in Ubuntu
- How to Install JAVA 8 (JDK 8u40) on Ubuntu & LinuxMint Via PPA
- How to Install JAVA 8 (JDK 8u91) on Ubuntu & LinuxMint via PPA
- How to Install NixNote on Ubuntu 13.04, Ubuntu 12.10 and Ubuntu 12.04 via PPA
- How To Install Oracle Java 7 (JDK) In Ubuntu
- Install Oracle Java JDK 7 in Ubuntu 12.04 (Precise Pangolin)
- install oracle java in ubuntu 12.04
- INSTALL RJAVA IN UBUNTU WITH ORACLE JAVA
- 通过PPA仓库为ubuntu安装Oracle Java 7
- install Java in ubuntu
- How to Install Oracle Java 6 in Ubuntu 12.10
- How to install Adobe flash 10.2 (Preview) in Ubuntu 10.10 (maverick) Using PPA
- RGB/YUV/M-JPEG
- ireport控制分页
- 实现对properties文件的顺序读出,并顺序写入。
- C语言static的作用
- postgresql 常用分页计算
- Install Oracle Java 7 in Ubuntu via PPA
- ExtJs 获得后台返回值
- iOS 从subview 转换到主视图的方法
- C
- 编程设计模式
- cout<<hex<<u.i<<endl 《程序员》的一道union题目
- webservice二进制文件传输
- 直接选择排序
- Custom Seekbar