I have installed JDK 9, downloaded and extracted and then installed. Now when I am adding the PATH variables in bashrc terminal is showing an error

bash: =/opt/jdk-9.0.1/: No such file or directory

Even though file is present. I have added only these lines

export PATH=$PATH:$JAVA_HOME/bin

at the end of the bashrc file.
I am using ubuntu 17.10.


To set a variable you need to omit the $, so in your case the line has to be:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.