JAVA_HOME and PATH are set but java -version still shows the old one

前端 未结 10 1416
温柔的废话
温柔的废话 2020-11-29 01:12

I am using Linux Mint Cinnamon 14. I have set the $JAVA_HOME and $PATH environment variables in ~/.profile as follows:



        
10条回答
  •  一向
    一向 (楼主)
    2020-11-29 01:57

    $JAVA_HOME/bin/java -version says 'Permission Denied'

    If you cannot access or run code, it which be ignored if added to your path. You need to make it accessible and runnable or get a copy of your own.

    Do an

    ls -ld $JAVA_HOME $JAVA_HOME/bin $JAVA_HOME/bin/java
    

    to see why you cannot access or run this program,.

提交回复
热议问题