using multiple versions of the SDK

     For three days,I try to fix a bug,really annoy !

     how to use multiple versions of the SDK under linux?

     uh...big question for the first time you come to it ,

     there are some really nasty detial info along this:

     1.java-openjdk-headless is unfit

     2.JAVA_HOME is uncorrectly configured

     3.we cant excute PATH..../java

 

     this just make me feel myself ill manner before a girl...

     so,after browsing for a hundred pages,I come to the best idea!

 

Do this:

  1. Delete all installations of Java.
  2. Install the Java SDK (self-extracting) into /opt/jdk1.6.0_16 (for example)
  3. Create a symbolic link: ln -s /opt/jdk1.6.0_16 /opt/jdk
  4. Edit $HOME/.bashrc :

    JAVA_HOME=/opt/jdk
    PATH=$PATH:$HOME/bin:$JAVA_HOME/bin

  5. Logout and log back in.

This offers many advantages:

  • You can install multiple versions of the SDK and need only switch a symbolic link.
  • You know where all the files are located.
  • You know exactly which version of Java is being used.
  • No other versions are installed, so there cannot be any conflicts.

I have done this for years and have never had any problems with Java on Linux.

Also, stay away from the OpenJDK as its fonts are terrible to behold.

 

 

 

http://www.kubuntuforums.net/forums/index.php?topic=3105915.5;wap2

http://kubuntuforums.net/forums/index.php?topic=3105915.5;wap2

BEST WAY :http://stackoverflow.com/questions/2224321/problems-installing-java-ee-sdk-on-linux

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值