How to Install Java Runtime Environment (JRE) in Ubuntu

1 ) Issue following command to find out current jdk version in apt-get

apt-cache search jdk
2 ) Install java JDK and JRE with apt-get install


apt-get install sun-java6-jdk sun-java6-jre
3 ) Ubuntu will auto download necessary file from web for installation.

Do you want to continue [Y/n]? y
Get:1 http://my.archive.ubuntu.com hardy/main java-common 0.28ubuntu3 [78.2kB]
Get:2 http://my.archive.ubuntu.com hardy/multiverse sun-java6-jre 6-06-0ubuntu1 [6334kB]
Get:3 http://my.archive.ubuntu.com hardy/main odbcinst1debian1 2.2.11-16build1 [66.2kB]
Get:4 http://my.archive.ubuntu.com hardy/main unixodbc 2.2.11-16build1 [289kB]
Get:5 http://my.archive.ubuntu.com hardy/multiverse sun-java6-bin 6-06-0ubuntu1 [27.3MB]
Get:6 http://my.archive.ubuntu.com hardy/multiverse sun-java6-jdk 6-06-0ubuntu1 [9625kB]
85% [6 sun-java6-jdk 3208002/9625kB 33%]

4) After installation done, jdk and jre will install at /usr/lib/jvm/java-6-sun-1.6.0.06

5) Ubuntu help to create a java symbolic link and put in /usr/bin for shortcut access

4 ) type java -version, DONE !!

Post-Installation Setup
Set JAVA_HOME into environment variable

Copy following statement and append to /etc/profile or .bashrc file, make system set JAVA_HOME into system environment variable.

export JAVA_HOME="/usr/lib/jvm/java-6-sun-1.6.0.06;"
P.S Please visit How to install JDK on Fedora Core, if you want to know how to install java jdk manually.
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值