Java command not found on Linux

前端 未结 5 2087
眼角桃花
眼角桃花 2020-11-28 11:35

In Oracle Enterprise Linux when I type java I am getting

bash: java: command not found

I have installed Java 1.6 and I have t

5条回答
  •  庸人自扰
    2020-11-28 12:35

    You can add one of the Java path to PATH variable using the following command.

    export PATH=$PATH:/usr/java/jre1.6.0_24/bin/
    

    You can add this line to .bashrc file in your home directory. Adding this to .bashrc will ensure everytime you open bash it will be PATH variable is updated.

提交回复
热议问题