LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   how to install java? (https://www.linuxquestions.org/questions/red-hat-31/how-to-install-java-112934/)

Txlyo 11-06-2003 01:26 AM

how to install java?
 
as title
i hv download and install the rpm file..
but i found that i seems need to config something in order to use...
how to config it?

retep 11-06-2003 03:14 AM

Hmm. I downloaded the JDK from http://javasoft.com. IIRC it was wrapped in a script. You run the script, and agree to their license. And that creates the RPM for you. Then its just rpm -Uvfh their RPM. No config required.

Why, what is happening for you?

init 11-06-2003 10:16 AM

go to http://java.sun.com/webapps/download/Display

get the Linux self-extracting file Make sure it is the SDK!!

run it from /usr/local

This just creates a java<version> directory. if you cd down into the bin you can type java -version and get a read out, but that is not really what you want so.....

then do this:

ln -s /usr/local/java_<versionyoudownloaded> /usr/local/java (or the other way around can never remember :P)

cd ~

vi .bash_profile or .profile depending on your shell pref.

and these lines

JAVA_HOME=/usr/java export JAVA_HOME

Than in you PATH line add this

PATH=$PATH:$JAVA_HOME/bin export PATH

then to source the profile type

. .bash_profile

then you should bge able to ....

echo $JAVA_HOME

and see path to java dir.

and run java -version from any dir..

hope this helps


All times are GMT -5. The time now is 08:46 PM.