Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4890  / 1 Year ago, fri, march 3, 2023, 5:20:08

I did these steps without error:




  1. JDK path : Downloads/jdk-6u37-linux-x64.bin


  2. Commands in Terminal :



           mkdir Programs
    cd Programs
    bash ../Downloads/jdk-6u37-linux-x64.bin
    ln -s jdk-6u37-linux-x64 jdk

  3. Set JAVA_HOME and Path:
    in Home ->View Menu ->Show Hidden Files.
    Then open .bashrc in text editor.
    I added the following lines to end of file.



    export JAVA_HOME=$Home/Programs/jdk
    export PATH=:$JAVA_HOME/bin:$PATH






This is the result of executing the command



echo $JAVA_HOME :
/Programs/jdk


This is the result of executing the command



echo $PATH :
:/Programs/jdk/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games1





And problem is :
This is the result of executing the command java -version :



The program 'java' can be found in the following packages:
* default-jre
* gcj-4.6-jre-headless
* gcj-4.7-jre-headless
* openjdk-7-jre-headless
* openjdk-6-jre-headless
Try: sudo apt-get install

More From » jdk

 Answers
7
export JAVA_HOME=$Home/Programs/jdk


You should use $HOME as $Home is undefined.



e.g.



export JAVA_HOME=$HOME/Programs/jdk

[#34445] Saturday, March 4, 2023, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ousear

Total Points: 395
Total Questions: 114
Total Answers: 89

Location: Jordan
Member since Thu, Aug 5, 2021
3 Years ago
;