LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-20-2004, 08:33 AM   #1
Roitoy
LQ Newbie
 
Registered: May 2004
Posts: 12

Rep: Reputation: 0
java and linux redhat 9


I'm a first time user in linux and I have a couple of questions. First would a java sdk and jre be installed with redhat 9 already or should i install one. Next how do i add the java to the environment variables. And lastly how to i do similar commands in linux as i would in windows, the ones i need to know first are run->cmd, javac myprogram.java and run->cmd, java myprogram

Thanks!
 
Old 05-20-2004, 08:52 AM   #2
vdogvictor
Member
 
Registered: Feb 2004
Distribution: Arch
Posts: 498

Rep: Reputation: 31
I am pretty sure fedora does not come with the java SDK...some distros like slackware do though. You will have do download the .bin or .rpm file from sun and install it (instructions on site) after installing it run this command

export PATH=$PATH:/path/to/java/stuff

and it will load your required commands.

run->cmd is the system menu (start menu thing) then navigate it till you find something called "terminal"

other than that all java commands are the same as windows.
 
Old 05-20-2004, 09:00 AM   #3
Roitoy
LQ Newbie
 
Registered: May 2004
Posts: 12

Original Poster
Rep: Reputation: 0
Quote:
export PATH=$PATH:/path/to/java/stuff
Do i just run that in the run command and it will take care of adding the environment variables?
 
Old 05-20-2004, 09:46 PM   #4
vdogvictor
Member
 
Registered: Feb 2004
Distribution: Arch
Posts: 498

Rep: Reputation: 31
Im not sure what you mean by "environment variables." If you mean it adds the java, javac, etc. commands to the command line then yes. Also you have to replace the /path/to/java part with the real path to the java files. Search for "javac" w/ the red hat searcher program thingy and it is probably whatever folder that is in.
 
Old 05-21-2004, 12:43 AM   #5
mamta_k
LQ Newbie
 
Registered: May 2004
Posts: 28

Rep: Reputation: 15
hello!
Redhat linux 9 is having a java compiler gcj (GNU compiler for java). u can get more about it from man pages and http://gcc.gnu.org/java/.

Or u can downlaod j2sdk for linux as rpm from sun.java.com (i am using this.)
ucan set the env variables by editing /etc/profile

PATH=$PATH:/usr/java/j2sdk1.4.2_04/bin

export PATH ..........
 
Old 05-21-2004, 04:17 AM   #6
maqish
LQ Newbie
 
Registered: Sep 2003
Location: Netherlands, Lelystad
Distribution: Slackware 9.1
Posts: 29

Rep: Reputation: 15
after downloading the java version of choice you should take a look at eclipse www.eclipse.org it saves you a lot of trouble using vi as java editor and the commandline for compiling and debugging

Maqish
 
  


Reply



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
Any recommended Java IDE for RedHat or any Linux ankursaxena Linux - Software 1 03-20-2005 04:20 PM
Compile and run java in Linux Redhat medeluckiest Linux - Newbie 1 03-15-2004 09:03 AM
Updating Java on RedHat Linux 8.0 sdsouza Linux - Software 0 11-21-2003 12:50 PM
Java installation on Linux (redhat 7.2) baburaj Linux - General 2 08-08-2003 12:02 AM
Java/LimeWire for Linux Redhat 7.2 bax Linux - General 5 01-01-2002 12:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:38 PM.

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