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
  • 3
    Please don't post screenshots of text, paste the actual text... Commented Oct 18, 2015 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. Commented Oct 18, 2015 at 9:11
  • 1
    Why not just install the Java RPM package via yum or dnf ? Commented Oct 18, 2015 at 13:19

2 Answers 2

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

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.