Installing the JRE on Ubuntu Systems


Note

 

The Oracle Java Runtime Environment (SRE) has been removed from the official software repositories of Ubuntu and only provides a binary (.bin) version. You can get the JRE from the Java SE Downloads.

  1. Download the appropriate version of the JRE, such as jre-6u31-linux-i586.bin, for your system and unpack it directly under /opt/java/<32 or 64>.

  2. Make the file executable:

    sudo chmod 755 /opt/java/32/jre-6u31-linux-i586.bin
    
  3. Go to the new folder:

    cd /opt/java
    
  4. Execute the file:

    sudo ./jre-6u31-linux-i586.bin
    
  5. Accept the license terms to continue installing the JRE.

  6. Tell the system that there’s a new Java version available:

    sudo update-alternatives --install "/usr/bin/java" "java" "/opt/java/32/jre1.6.0_31/bin/java" 1
    

Note

 

If updating from a previous version that was removed manually, execute the above command twice, because you’ll get an error message the first time.

  1. Set the new JRE as the default:

    sudo update-alternatives --set java /opt/java/32/jre1.6.0_31/bin/java
    
  2. Make sure your system is now using the correct JRE:

    $ sudo java -version
    
    java version "1.6.0_31"
    Java(TM) SE Runtime Environment (build 1.6.0_31-b04)
    Java HotSpot(TM) 64-Bit Server VM (build 20.1-b04, mixed mode)
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值