*
The moose likes Linux / UNIX and the fly likes Setting classpath in linux. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Setting classpath in linux." Watch "Setting classpath in linux." New topic
Author

Setting classpath in linux.

Andrew Stallard
Ranch Hand

Joined: Mar 06, 2010
Posts: 33
I have RedHat Linux, and I want to set the classpath for my junit utility. According to your faq I should have a file called .bash_profile in my home directory. However, I can't find it anywhere. In addition, I tried creating this file in my home directory and running it as a shell script. I tried:



This does nothing. How can I do this?

Thank You for Responding

Andrew Stallard
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15960
    
  19

I don't set CLASSPATH in my $HOME/.bash_profile. Which is a file you'll only have if bash is your command shell. ksh and csh have their own login scripts.

The reason I don't set CLASSPATH there is that usually I set classpaths on a per-program basis.

However, my bash profile does set JAVA_HOME and adds JAVA_HOME/bin to the PATH. Also ANT_HOME and MAVEN_HOME.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Setting classpath in linux.
 
Similar Threads
Problems installing JUnit on Linux
Linux java setup
EJB, log4j, and access denied to log4.properties
A question on setting CLASSPATH on linux
Errors when compiling these classes...