posted 14 years ago
book k and b 6.0
page 804 last paragraph
"remember when using classpath,
the last directory in the path must be the super-directory of the root directory for the package" and explanation ...
test
|--b.java (public class b extends a { public static void main(String [ ]str){} }) import myapp.utils.*;
|--ws
......|--myapp
..............|--utils
.....................|--a.class (public class a{}) (package myapp.utils)
i applied cp according to book such as
cd test
javac -cp ws b.java // it compiles
java -cp ws user // exception in main --NoClassDefFound
whats missing ? help?
thanks in advance