在 .bashrc 文件中设置 JAVA_HOME 以运行 wso2.sh 文件

在 .bashrc 文件中设置 JAVA_HOME 以运行 wso2.sh 文件

我正在尝试设置wso2按照此教程,我在设置 JAVA_HOME 变量时遇到了一些问题。

我找到了这个邮政设置路径为jdk,但是当我打开一个新的终端窗口时我得到以下输出:

Command 'lesspipe' is available in the following places
 * /bin/lesspipe
 * /usr/bin/lesspipe
The command could not be located because '/usr/bin:/bin' is not included in the PATH environment variable.
lesspipe: command not found
Command 'dircolors' is available in '/usr/bin/dircolors'
The command could not be located because '/usr/bin' is not included in the PATH environment variable.
dircolors: command not found
Command 'ls' is available in '/bin/ls'
The command could not be located because '/bin' is not included in the PATH environment variable.
ls: command not found

这是我当前的路径变量:

export PATH=${JAVA_HOME}/home/username/java/jdk1.8

- - - - - - - - - - - - - - -更新 - - - - - - - - - - - - - - - - - - - -

export JAVA_HOME="home/username/java/jdk1.8"
export PATH=$PATH:JAVA_HOME

现在 bash 文件似乎运行良好,但是当我尝试运行 wso2server.sh 文件时仍然出现错误,并显示以下输出:

Error: JAVA_HOME is not defined correctly.
 CARBON cannot execute /username/java/jdk1.8/bin/java

- - - - - - - - - - - - - 更新 - - - - - - - - - - - - - - - - - - - - -

运行此命令来查找我的路径:

readlink -f (which java)

给出:

/usr/lib/jvm/java-8-oracle/jre/bin/java

这是正确的路径吗?之前更新中提供的路径没有指向 jdk

相关内容