java——安装


If you want the easy route to installing and updating Oracle Java 8(including the JRE, JDK and plugins for browsers) on Ubuntu 12.04 (or later) then I recommend doing it this way. First delete the file you downloaded as it isn't needed and proceed with these instructions:

Open a Linux terminal (command prompt) and issue these commands:

sudo add-apt-repository ppa:webupd8team/java

This will add a repository where developers place updated version of Oracle Java 8 in a format easily installed by Ubuntu package managers. When running that command it may (or may not prompt) you for your password. If it asks for a password enter your user account password. After it runs it will display information and then prompt you to hit Enter. Hit enter key to continue. You should be back at a shell prompt. Now issue these 2 commands:

sudo apt-get update

You will be prompted "Do you want to continue?". Hit y and enterWhen completed it will return to the shell prompt. Now issue this command:

sudo apt-get install oracle-java8-installer

This will download Oracle Java 8 and install it. Information will scroll past on the screen but when finished java should be installed. I did verify on my system that this repository is up to date and using the version of Oracle Java 8 referenced in your question.

To verify that Oracle Java 8 can be found and is the right version issue this command:

java -version

It should respond with information pretty similar to this:

java version "1.8.0_20"
Java(TM) SE Runtime Environment (build 1.8.0_20-b26)
Java HotSpot(TM) 64-Bit Server VM (build 25.20-b23, mixed mode)

If yours shows the SE Runtime as build 1.8.0_20-b26 then you are good to go.

If in the future you do a package upgrade (through the GUI or command line) it will look for a new version of Oracle Java along with all the other installed packages on your system.

From the command line you can always attempt to do an upgrade on all packages (including Oracle Java) with this command:

sudo apt-get upgrade

If you ever wish to remove Oracle Java 8 you can use this command:

sudo apt-get remove oracle-java8-installer
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值