0

while installing java in redhat i'm facing some problems..i've attached the screen print. enter image description here

i unzipped the file using tar command .once i created the softlink for it ,i should be able to see java version and all but which in this case i'm not able to see

  • 3
    Please don't post screenshots of text, paste the actual text... – jasonwryan Oct 18 '15 at 6:52
  • Where did you install Java? I've got no experience with RHEL, but my first guess would be that you installed java in a place not known to the system. – s3lph Oct 18 '15 at 9:11
  • 1
    Why not just install the Java RPM package via yum or dnf ? – steve Oct 18 '15 at 13:19
0

You might have extracted the jdk-7-linux-x64.tar.gz file to the "jdk" directory. Now, inside this directory, you will find a directory called "bin". And the "java" binary would resides at this location.

So, add the below lines to the file ~/.bash_profile file with the logged in user (in our current scenario abhishek).

export JAVA_HOME=$HOME/Desktop/jdk    
export PATH=$JAVA_HOME/bin:$PATH

Save the file and run the below command at the command prompt.

$ cd 
$ . .bash_profile

Now, run the below commands for knowing where from the java is being picked

$ which java
$ java -version
0
yum install java-1.7.0-openjdk-devel

and then do,

java -version

For more inputs, refer redhat manual

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.