Re: Setting classpath to include junit
Andrew Haley <[email protected]>
| Newsgroups | gmane.comp.gcc.java.devel |
|---|---|
| Message-ID | <[email protected]> |
Carl wrote: > Hi, I couldnt find a java-help mailing list like there is for > gcc-help, so I hope this is the right place to post. Im trying to use > gcj from the command line to compile a java assignment for university, > but i cant seem to work out how to add junit to my build path (is that > a java-y term, idk). Anyway, I can compile using gcj as long as I dont > go outside the scope of libgcj.jar. Im using a debian system, and I > have a directory called /usr/share/java/ which contains junit.jar. Ive > tried virtually every permutation of CLASSPATH, with things like > export CLASSPATH=/usr/share/java/junit.jar > and so on. Anyway, regardless of what i do i keep getting a > LinkedDequeTest.java:3: error: The import org.junit cannot be resolved > import org.junit.Test; > I gave in and installed the sun javac, only to get a similar error message. > LinkedDequeTest.java:3: package org.junit does not exist > import org.junit.Test; > So im hoping that its just a problem with my configuration. Ive > already purged sun java and vrms is slightly less mad at me. Thanks > for any help, I just cant seem to figure this one out on my own. If you'd actually provided a small example I probably would have an answer for you immediately, but as it is I can only guess what you're doing wrong. In the example above you show the compiler output but you don't show the command line that produced it. Provide me with a complete example and I'll show you how to build it. Andrew.