LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Compile and run java in Linux Redhat (https://www.linuxquestions.org/questions/linux-newbie-8/compile-and-run-java-in-linux-redhat-157910/)

medeluckiest 03-15-2004 07:55 AM

Compile and run java in Linux Redhat
 
hihi, i m new in using linux...i have few questions to ask regarding to my linux,

if not mistaken, i install linux redhat (shrike) 9,
i heard ppl said that linux redhat able to compile and run java program

after i install my linux, i cannot find my java compiler...
i type "java -version" in the terminal, but it oways said command not found,
so it means that my linux dun hav java compiler izzit...

later on i downloaded a j2sdk-1_3_1-linux-i386 and j2sdk-1_3_1-linux-i386.rpm, then i install it in linux using "chmod" which i got the command from the internet.....

i installed in 2 places , /home/<myname> and /usr/local
so i try to compile java but it stil said command not found,
izzit that i install in the wrong folder or need to configure something on linux so that it can compile and run java....

pls help....thanx for any help.... i would really appreciate it...thanx..

qwijibow 03-15-2004 09:03 AM

chmod is a tool used for changinf file permissions... to install the rpm you need....

su
[root pass]
rpm -Uvh /path/to/hava.rpm

that will install java to /usr/java/jre2/

now, you need to add it to your path variable.

open $HOME/.bash_profile

you will see a line that sets the variable $PATH. add java's bin folder to it.

then java will be installed.


All times are GMT -5. The time now is 05:58 AM.