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? |
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? |
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. |