Reputation: 832
I have the following files, both has the same package definition:
awesome.java
awesomeTest.java
the package (and directories) for these files is :
package awe.some
I try to compile them in command line
However they don't seem to compile, since awesomeTest.java
use import junit.framework.*;
How do I compile this properly in command line?
Thanks.
Upvotes: 0
Views: 57
Reputation: 691635
Same as for running java classes: the jar must be in the classpath for the compiler to be able to load the classes it contains:
javac -cp /path/of/junit-4.1.jar awe/some/awesomeTest.java
Note that classes from junit.framework are obsolete in JUnit4. You should not use them anymore for new tests.
Upvotes: 1