Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-15-2004, 08:55 AM   #1
LQ Newbie
Registered: Mar 2004
Posts: 2

Rep: Reputation: 0
Smile 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..
Old 03-15-2004, 10:03 AM   #2
LQ Guru
Registered: Apr 2003
Location: nottingham england
Distribution: Gentoo
Posts: 2,672

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

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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 04:56 AM
compile and run java pelegk2 Programming 3 10-05-2004 10:28 AM
GIF gone in program when compile Java in Linux dwarf007 Programming 1 10-01-2004 12:15 AM
when ever i run a java gui on my redhat 9 it always dislays some warnings anjiie Programming 2 03-09-2004 02:50 PM
compile c++ in linux to run win windows2k qwijibow Programming 2 09-23-2003 12:53 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:26 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration