ITPub博客

首页 > 应用开发 > Java > linux下安装jdk

linux下安装jdk

原创 Java 作者:哎呀我的天呐 时间:2014-12-18 11:19:49 0 删除 编辑
虚拟机一定要安装英文版的,要不然恶心死你!!!
[root@xhw48 weblogic]# mkdir /usr/java

    必须把 jdk-6u7-linux-i586.bin拷贝到/usr/java进行解压和安装,这是标准的安装位置,虽然其他位置也不会影响到使用。
[root@xhw48 java]# pwd
/usr/java
[root@xhw48 java]# ll

[root@xhw48 java]# ./jdk-6u7-linux-i586.bin 
在按提示输入yes后,jdk被解压。

出现一行字:Do you aggree to the above license terms? [yes or no]  
yes

验证安装成功

点击(此处)折叠或打开

  1. [root@xhw48 java]# java
  2. Usage: gij [OPTION] ... CLASS [ARGS] ...
  3.           to invoke CLASS.main, or
  4.        gij -jar [OPTION] ... JARFILE [ARGS] ...
  5.           to execute a jar file
  6. Try `gij --help\' for more information.
  7. [root@xhw48 java]# java -version
  8. java version \"1.4.2\"
  9. gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-48)


  10. Copyright (C) 2006 Free Software Foundation, Inc.
  11. This is free software; see the source for copying conditions. There is NO
  12. warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  13. [root@xhw48 java]# javac
  14. Eclipse Java Compiler v_677_R32x, 3.2.1 release
  15. Copyright IBM Corp 2000, 2006. All rights reserved.
  16.  
  17.  Usage:
  18.  If directories are specified, then their source contents are compiled.
  19.  Possible options are listed below. Options enabled by default are prefixed
  20.  with \'+\

weblogic用户添加环境变量。

点击(此处)折叠或打开

  1. export JAVA_HOME=/usr/java/jdk1.6.0_07

  2. export JAVA_BIN=/usr/java/jdk1.6.0_07/bin

  3. export PATH=$PATH:$JAVA_HOME/bin

  4. export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

  5. export JAVA_HOME JAVA_BIN PATH CLASSPATH


最后source下即可


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-1371945/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: 34_undo表空间概述
请登录后发表评论 登录
全部评论
https://cloud.tencent.com/developer/inventory/14362

注册时间:2014-10-30

  • 博文量
    403
  • 访问量
    2528690