This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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
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 ]
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?
Joined: Sep 17, 2002
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