Ubuntu12 安装JDK1.7

JDK 1.7.0_17 install

1. Download JDK from:
     http://www.oracle.com/technetwork/java/javase/downloads/index.html

2. sudo mkdir /usr/lib/jdk

3. sudo tar -zxvf ./jdk-7u17-linux-i586.tar.gz -C /usr/lib/jdk/

4. sudo mv /usr/lib/jdk/jdk1.7.0_17/ /usr/lib/jdk/oracle_jdk1.7.0_17

5. sudo gedit /etc/profile

add below at the end of file:

export JAVA_HOME=/usr/lib/jdk/oracle_jdk1.7.0_17
export JRE_HOME=/JAVA_HOME/jre
export CLASSPATH=$CLASSPATH:.:$JAVA_HOME/lib:$JRE_HOME/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH

6. setup config
sudo update-alternatives --install /usr/bin/java java /usr/lib/jdk/oracle_jdk1.7.0_17/bin/java 300
sudo update-alternatives --install /usr/bin/javac javac /usr/lib/jdk/oracle_jdk1.7.0_17/bin/javac 300
sudo update-alternatives --config java
sudo update-alternatives --config javac

*******************************************************************************************************

7.JAI

Linux 32- and 64-bit Operating Environment Installation Instructions

The downloaded files are:

    jai-1_1_3-lib-linux-$ARCH-jdk.bin
    jai-1_1_3-lib-linux-$ARCH-jre.bin
    jai-1_1_3-lib-linux-$ARCH.tar.gz

where ARCH is either i586 for the 32-bit platform or amd64 for the 64-bit platform.

To install the JDK version for Linux, assuming:

    $JDK       is the path into the jdk1.3 (or a higher version),
    $downloaddir  is the directory into which you downloaded the .bin files.

Run the following commands:

    % cd $JDK
    % chmod u+x $downloaddir/jai-1_1_3-lib-linux-$ARCH-jdk.bin
    % $downloaddir/jai-1_1_3-lib-linux-$ARCH-jdk.bin

Note that unlike in the case of Solaris, the Linux 32- and 64-bit installations are not layered but rather mutually exclusive.

IMPORTANT: If you do not "cd" to the JDK1.3 (or higher version) directory before performing the extraction, then JAI will not work correctly. You may also need appropriate write permissions into the JDK directory in order to install.

To install the JRE version for Linux, try

      % cd $JRE         ($JRE is the path into jre1.3 or later version.)
      % chmod u+x $downloaddir/jai-1_1_3-lib-linux-$ARCH-jre.bin
      % $downloaddir/jai-1_1_3-lib-linux-$ARCH-jre.bin

IMPORTANT: If you do not "cd" to the JRE1.3 (or higher version) directory before performing the extraction, then JAI will not work correctly. You may also need appropriate write permissions into the JRE directory in order to install.  

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值