0

After installing Oracle Java 8 in Linux mint, When I typed java --version on terminal it says

bash: /usr/bin/java: Permission denied.

Can I know why this is happening??

3
  • Change the access or owner of the catalog with chmod / chown. Commented Mar 10, 2020 at 5:23
  • You did not install it correctly. We don't know how you installed it. Commented Mar 10, 2020 at 5:24
  • 1.I downloaded the java SE 8 file from oracle website. 2. I created a folder called java in opt and extracted the downloaded tar ball into that file. 3. then I took a terminal and typed this sudo update-alternatives --install /usr/bin/java java /opt/java/jdk1.8.0_231/bin/java 100 4.then I configged java and selected the correct location. 5. then I updated the java home variables in etc/environment as JAVA_HOME=/opt/java/jdk1.8.0_231 JRE_HOME=/opt/java/jdk1.8.0_231/jre. all these steps worked correctly. but at the end when type java --version it says permission denied. Commented Mar 10, 2020 at 5:34

1 Answer 1

1

Try giving executable permission to java using chmod.

sudo chmod a+x /usr/bin/java

where '/usr/bin/java' is the java path.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.