This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
Hello... I have been having trouble installing JUnit 3.8.1 on my Linux distribution, Red Hat 7.3, in particular. Here's what I did: 1. I logged into Red Hat 7.3 as root 2. I downloaded JUnit3.1.8 frpm http://www.junit.org/index.htm 3. I followed the instructions by unzipping it, and I unzipped it at: /usr/local/junit3.8.1 the junit.jar was located at /usr/local/junit3.8.1/junit.jar The instructions told me to append/add the junit3.8.1 directory and the junit.jar file to my CLASSPATH, so I did this: cd /root vim .bash_profile and added accordingly (this is what my .bash_profile looks like): ------------------------------------------------------ # .bash_profile # Get the aliases and functions if [ -f ~/.bashrc ]; then . ~/.bashrc fi # User specific environment and startup programs JUNIT_HOME=$JUNIT_HOME:/usr/local/junit3.8.1/ JAVA_HOME=$JAVA_HOME:/usr/local/java/j2sdk1.4.0_01 J2EE_HOME=$J2EE_HOME:/usr/local/j2sdkee1.3.1 CLASSPATH=$CLASSPATH:.$JAVA_HOME/lib/tools.jar:$JAVA_HOME/jre/lib/rt.jar:$J2EE_HOME/lib/j2ee.jar:$JUNIT_HOME/junit.jar:$JUNIT PATH=$PATH:$HOME/bin:$JAVA_HOME/bin:$J2EE_HOME/bin BASH_ENV=$HOME/.bashrc USERNAME="root" export USERNAME BASH_ENV PATH JAVA_HOME CLASSPATH J2EE_HOME JUNIT_HOME -------------------------------------------------- And when I try to test it by typing in the following on the command line: java junit.textui.TestRunner junit.samples.AllTests It printed: Exception in thread "main" java.lang.NoClassDefFoundError: junit/textui/TestRunner Can anyone help me with this problem? -Unnsse
Originally posted by Unnsse Khan: # User specific environment and startup programs JUNIT_HOME=$JUNIT_HOME:/usr/local/junit3.8.1/ JAVA_HOME=$JAVA_HOME:/usr/local/java/j2sdk1.4.0_01 J2EE_HOME=$J2EE_HOME:/usr/local/j2sdkee1.3.1
I am not very familiar with unix environments, but I think those should read # User specific environment and startup programs JUNIT_HOME=/usr/local/junit3.8.1/ JAVA_HOME=/usr/local/java/j2sdk1.4.0_01 J2EE_HOME=/usr/local/j2sdkee1.3.1 [ December 04, 2002: Message edited by: Ilja Preuss ]
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Hmm, a couple recomendations: 1) Do not set up classpaths in your environment. Setting JAVA_HOME, ANT_HOME, JUNIT_HOME are okay, but setting up the actual CLASSPATH will bring you grief down the line when you think you are running against one library, but you are really running against a different version of it that was configured in your system classpath. 2) Ilja is exactly right, JAVA_HOME, ANT_HOME, JUNIT_HOME, JBOSS_HOME and those really shouldn't even be more than a single path. These do not represent search paths, they are absolute paths to these direcotries - so you don't want /path/one:/path/two you just want the path you wish to use. -Brian