Sandip Nath
Sandip Nath

Reputation: 644

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.

Upvotes: 1

Views: 109

Answers (2)

Shepard62FR
Shepard62FR

Reputation: 300

Your shell is interpreting JAVA_HOME as string, you forgot a $ before JAVA_HOME in the export PATH line to make it interpret as a variable.

Upvotes: 0

Federico Gatti
Federico Gatti

Reputation: 535

try export PATH=$PATH:${JAVA_HOME}/bin

Upvotes: 1

Related Questions