Ubuntu has problems with JUnit 4 (I think because of a licensing
issue)
You should be able to fix it by locally downloading and unpacking the
latest version of Eclipse. Then copy the directory org.junit4_4.1.0.1
and the file org.eclipse.jdt.junit4.runtime_1.0.1.r321_v2006090 5.jar
from the local eclipse plugins to the system eclipse plugins (/usr/lib/
eclipse/plugins) directory. After a restart of eclipse JUnit4 tests
should work.
===
To add JUnit to the build path in either OS:
Window -> Preferences -> Java -> Installed JREs -> Edit current JRE ->
Add External JARs -> add JUnit 4
Also make sure that Window -> Preferences -> Java -> JUnit -> stuff is
enabled
You can also add JUnit 4 to the build path on a project by project
basis. The option is hidden somewhere in the long list of options
when you right click on a project.
On Dec 2, 7:29 pm, Dan Weis <Weis...@gmail.com> wrote:
> XP SP2 and Ubuntu 7.10, but I have installed the build-essential
> package. I'm assuming that I just need to reference JUnit in the
> build path for this as well. How do I do that in Eclipse?
> On Dec 2, 2:05 pm, Owen Durni <o...@andrew.cmu.edu> wrote:
> > What OS and version of java are you using?
> > You should make sure that JUnit is in your build path.
> > On Dec 1, 8:48 pm, Dan Weis <Weis...@gmail.com> wrote:
> > > When I attempt to run junit tests, I get the following message:
> > > "The import org.junit cannot be resolved'
> > > How can I resolve this issue?
> > > Thanks,
> > > Dan Weis