Package not found error

S

sjoshi

Hello
When try to run my simple build.xml, I get these errors:

[javac] D:\Sunit\JavaFiles\workspace\Ch2\src\org\sj\Ch2_01Test.java:9:
package junit.framework does not exist
[javac] import junit.framework.TestCase;
[javac] D:\Sunit\JavaFiles\workspace\Ch2\src\org\sj\Ch2_01Test.java:17:
cannot resolve symbol
[javac] symbol : class TestCase
[javac] location: class org.sj.Ch2_01Test
[javac] public class Ch2_01Test extends TestCase

Now I can run the Ch2_01Test file within eclipse and it goes thru.
fine. Under my project's properties, I have in the Order And Export tab
listed
Ch2/src - Checked
JRE System Library 1.4.2 - Unchecked
[JUNIT_HOME]/juint.jar - path to the jar file - I Checked this one

Under Libraries tab
I have both JUNIT_HOME and SRE System Library

Any ideas what might be wrong that Ant complains. I'm in Eclipse 3.1

thanks
Sunit
 
R

Roedy Green

Any ideas what might be wrong that Ant complains.

Can you dump Ant's view of the classpath? Perhaps ticking that box is
not sufficient to inform ant about the junit jar.

Have you in some way told Eclipse you are going to generate your own
ant script and therefore Eclipse is no longer meddling with it, namely
adding the junit jar to the classpath.

If you can turn on the -verbose option both in ant and in javac, it
might give you a clue as to what is going on.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,982
Messages
2,570,190
Members
46,740
Latest member
AdolphBig6

Latest Threads

Top