简体   繁体   中英

Eclipse unable to locate Java in Ubuntu

While I am trying to install the Payara server on my Ubuntu machine after putting the path of the Payara/glassfish server when I try to put the java location whatever i give as path is considered as error. I use Oracle java 10 and as I put the value "/usr/lib/java/jdk-10.0.1/" it says its not a jdk. Path for Java 10 has been properly set in ~/.bashrc as

export JAVA_HOME=/usr/lib/java/jdk-10.0.1/
export PATH="$PATH:JAVA_HOME/bin"

Why is this behaving in this way? Can anybody suggest me a way out.

尝试export PATH=$PATH:${JAVA_HOME}/bin

您的 shell 将JAVA_HOME解释为字符串,您在export PATH行中的JAVA_HOME之前忘记了$以使其解释为变量

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM