1

好的,我正在尝试在我的 Ubuntu 12.04 LTS 服务器上安装 Websphere(来自 IBM)。

但是在安装.bin时,它说在服务器上找不到 Java VM,但是当我获得 Java 版本时就很好了。

这是我运行此命令时得到的响应:

$ sudo path/*.bin

Preparing to install ...
Extracting the installation resources from the installer archive..
Configuring the installer for this system's environment...
no Java virtual machine could be found from your PATH environment variable. You must install a VM prior to running this program.


$ java -version

java version "1.6.0"
Java(TM) SE Runtime Environment (build pxi3260sr12-20121025_01(SR12))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Linux x86-32 jvmxi3260sr12-20121024_126067 (JIT enabled, AOT enabled)
J9VM - 20121024_126067
JIT - r9 20120914_26057
GC - 20120925_AA)
JCL - 20121014_01

$ cat /etc/environment

JAVA_HOME="/opt/ibm/java-i386-60"
JRE="$JAVA_HOME/jre"
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/opt/imb/java-i386-60/bin:/opt/ibm/java-i386-60/jre/bin"
4

1 回答 1

2

使用sudo时,命令以当前用户身份运行root,而不是以当前用户身份运行。您需要配置root's$PATH以包含 Java。

尝试sudo java -version查看是否为 Java 配置了属性root(听起来不是)。

于 2013-03-26T10:53:41.777 回答