aspose file tools*
The moose likes Linux / UNIX and the fly likes Linux installation help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Linux installation help" Watch "Linux installation help" New topic
Author

Linux installation help

R Harvey
Greenhorn

Joined: Sep 17, 2002
Posts: 20
Hi people!
I'm going to start doing lots of Java on my Linux machine! I've downloaded the linux JDK, JRE and J2EE, and installed them fine on my system, but there's still a couple of issues:
1) I can't execute the programs directly, ie. to run 'javac' i have to type './javac' instead of plain old 'javac'. Is there some way of rectifying this?
2) I don't know which system file to declare my java vars in (ie. JAVA_HOME etc..) (I'm on Redhat 7.1)
Maybe (1) will be sorted as soon as we rectify (2) - i just don't know...
One last thing, i installed all of the above packages as root, is this a good idea, or should i create a new user for all of the Java things to run under?
Thanks for your help
Robin
Cindy Glass
"The Hood"
Sheriff

Joined: Sep 29, 2000
Posts: 8521
Moving to the Linux Forum.


"JavaRanch, where the deer and the Certified play" - David O'Meara
Sean Casey
Ranch Hand

Joined: Dec 16, 2000
Posts: 625
1. I'm not sure. I can just type java or javac by default.
2. put them in /etc/profile
Greg Harris
Ranch Hand

Joined: Apr 12, 2001
Posts: 1012
on redhat 7.1 you can put your java variables in ~/.bash_profile
you need to add . to your classpath so you can execute programs in the current working directory. so, your classpath in the ~/.bash_profile file should have something like this:
CLASSPATH=$CLASSPATH:.:/path/to/java/programs:
[ January 16, 2003: Message edited by: Greg Harris ]

what?
Ravee Bhat
Ranch Hand

Joined: Nov 26, 1999
Posts: 72

let your PATH variable in /etc/profile point to bin directory of your jdk installation. say /usr/local/jdk/bin.
setting CLASSPATH will solve your class file lookup problem.
for the last thing. Even I am not sure about how good the idea is to set it as root. can anyone throw some light on this part?
R Harvey
Greenhorn

Joined: Sep 17, 2002
Posts: 20
Thanks people, i'm going to try this over the weekend, let's hope i dont wreck my machine in the process!
Have a good one....
Robin
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

Originally posted by Tim Holloway:
From ~/.bash_profile:


Customer surveys are for companies who didn't pay proper attention to begin with.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Linux installation help