Red Hat Enterprise Linux 5.1上安装JDK

[root@localhost6 ~]# java --help
Usage: gij [OPTION] ... CLASS [ARGS] ...
          to interpret Java bytecodes, or
       gij -jar [OPTION] ... JARFILE [ARGS] ...
          to execute a jar file


  --cp LIST         set class path
  --classpath LIST  set class path
  -DVAR=VAL         define property VAR with value VAL
  -?, --help        print this help, then exit
  -X                print help on supported -X options, then exit
  --ms=NUMBER       set initial heap size
  --mx=NUMBER       set maximum heap size
  --verbose[:class] print information about class loading
  --showversion     print version number, then keep going
  --version         print version number, then exit


Options can be specified with `-' or `--'.


See http://gcc.gnu.org/java/ for information on reporting bugs
[root@localhost6 ~]# gij --version
java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20070626 (Red Hat 4.1.2-14)


Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO

warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.


以上看到的是操作系统默认的Java环境。

 

1.到Oracle的官网上下载jdk,执行安装。

2.执行“ln -svf /usr/java/default/bin/java /usr/bin/java”。

3.执行“java -version”查看替换是否已经成功。注意不要使用“java --version”的形式。

http://forums.fedoraforum.org/showthread.php?t=156074

 

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值