Trying to get a class to compile here, need some help. This is from SB SCJP5, Ch. 10, question 12. Given two files:
and the following sub-directory structure:
test
|--UseKit.class
|
com
|--KitJar.jar
I've compiled Kit.class and made KitJar.jar, confirmed by
jar -tf KitJar.jar
META-INF/
META-INF/MANIFEST.MF
pkg/
pkg/Kit.class
Now, here's the problem... trying to compile UseKit.java. If I'm in directory
test, I thought that i would compile with
javac -cp com/KitJar.jar UseKit.java
but get the error
UseKit.java:1: '.' expected
import pkg;
^
1 error
Trying to decipher the error, it looks like the compiler can't search the current directory... so I also tried
javac -cp com/KitJar.jar:. UseKit.java
and get the same error. What am I doing wrong?