java amateur
Originally posted by miguel lisboa:
you'v to tell javac and java where to find junit.jar
supposing you'v it inside a folder called junit3.8.1 under C, you can use this from command line:
prompt>set JUNIT_HOME=C:\junit3.8.1
prompt>set CLASSPATH=C:\junit3.8.1\junit.jar;.
you can proceed in similar fashion with ant:
prompt>set ANT_HOME=C:\apache-ant-1.6.2
# unzip the junit.zip file
# add junit.jar to the CLASSPATH. For example: set classpath=%classpath%;INSTALL_DIR\junit3\junit.jar
# test the installation by using either the batch or the graphical TestRunner tool to run the tests that come with this release. All the tests should pass OK.
Notice: that the tests are not contained in the junit.jar but in the installation directory directly. Therefore make sure that the installation directory is on the class path
* for the batch TestRunner type:
java junit.textui.TestRunner junit.samples.AllTests
Originally posted by Nigel Browne (in one of the missing posts):
No you must add the jar file to the classpath. You should have typed:
set classpath=%classpath%;C:\Program Files\JavaPackages\junit3.8.1.jar
If that's where the jar file is.
"Notice: that the tests are not contained in the junit.jar but in the installation directory directly. Therefore make sure that the installation directory is on the class path"
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Originally posted by Joel McNary:
From a command prompt, type:
set CLASSPATH
and look at the results/post them here.
When I write Ant scripts I always set the classpath in the script. I do this as follows
I then use the classpath when I build and run, for example
It is easy to control the elements on your classpath using Ant.
Originally posted by Dave Merrill:
Thought I covered that in my last post, but here it is:
CLASSPATH=c:\Program Files\PhotoDeluxe HE 3.1\Adboe Connectables;;C:\Program Files\JavaPackages\junit3.8.1
The only entries that show are the ones under my user name, with the session-specific changes appended to the end. The system classpath entries aren't visible, but they're clearly in effect, because ant runs.
[ April 21, 2005: Message edited by: Dave Merrill ]
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |