Eclipse cannot find Java on Ubuntu

后端 未结 8 1110
自闭症患者
自闭症患者 2021-02-09 05:38

Java is properly installed in my Ubuntu 12.04 and the PATH variable is set in the .bashrc file.

The command java -version gives an expected out

8条回答
  •  误落风尘
    2021-02-09 06:02

    Follow below step to define path variable available for all launcher for manually installed JDK

    Step:

    1-

     cd /etc/
    

    2-

    sudo vim ~/.profile
    

    3- Add below codes in your step2 open file

      PATH="$HOME/bin:$HOME/.local/bin:/usr/lib:$PATH"
    
      JAVA_HOME="/usr/lib/jvm/jdk1.7.0_79"
    
      export JAVA_HOME
    
      PATH=$PATH:$JAVA_HOME/bin
    
      export PATH
    

    4-Restart your system

提交回复
热议问题