Are classpath, junit.jar and import org.junit statement independent of each other in Eclipse?
After adding junit.jar on Windows 7 (environment) classpath I am not able to benefit from importing org.junit.*; statement in Eclipse for Java. Eclipse informs that the import org.junit cannot be resolved. Is it normal behaviour?
By using command line (cmd.exe) junit works fine:
java org.junit.runner.JUnitCore org.junit.tests.AllTests
However, within Eclipse I cannot use Junit classes.
Are classpath, junit.jar and import org.junit statement independent of each other in Eclipse? After
Share
The project build path is in charge in Eclipse. If junit.jar (of appropriate version) or the JUnit eclipse lib are on the build path, you can import junit classes. If not, not. The classpath environment variable is never a good idea.