虚拟机一定要安装英文版的,要不然恶心死你!!!
[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
验证安装成功
-
[root@xhw48 java]# java
-
Usage: gij [OPTION] ... CLASS [ARGS] ...
-
to invoke CLASS.main, or
-
gij -jar [OPTION] ... JARFILE [ARGS] ...
-
to execute a jar file
-
Try `gij --help\' for more information.
-
[root@xhw48 java]# java -version
-
java version \"1.4.2\"
-
gij (GNU libgcj) version 4.1.2 20080704 (Red Hat 4.1.2-48)
-
-
-
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.
-
[root@xhw48 java]# javac
-
Eclipse Java Compiler v_677_R32x, 3.2.1 release
-
Copyright IBM Corp 2000, 2006. All rights reserved.
-
-
Usage:
-
If directories are specified, then their source contents are compiled.
-
Possible options are listed below. Options enabled by default are prefixed
-
with \'+\
weblogic用户添加环境变量。
-
export JAVA_HOME=/usr/java/jdk1.6.0_07
-
-
export JAVA_BIN=/usr/java/jdk1.6.0_07/bin
-
-
export PATH=$PATH:$JAVA_HOME/bin
-
-
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
-
-
export JAVA_HOME JAVA_BIN PATH CLASSPATH
最后source下即可
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/29990276/viewspace-1371945/
,如需转载,请注明出处,否则将追究法律责任。