D
Derek Fountain
Newbie one: I have a Hello.class in my local directory which prints "Hello"
and a World.class in ./org/test which prints "World". The World class is in
a package (org.test) which the Hello class imports and calls to. It works
fine.
Now I want to put the World class in a JAR. I create the JAR with "jar cf
World.jar World.class" which seems to work properly, but that leaves the
question of where do I put the JAR file and how do I run the JVM such that
it finds the class inside the JAR?
I tried putting the JAR in the local directory and running with a CLASSPATH
set to ., I tried putting the JAR in the org/test directory, I tried
putting the World.jar in the CLASSPATH, and several other permutations, but
I can't find the one that works. Can someone spell it out for me?
and a World.class in ./org/test which prints "World". The World class is in
a package (org.test) which the Hello class imports and calls to. It works
fine.
Now I want to put the World class in a JAR. I create the JAR with "jar cf
World.jar World.class" which seems to work properly, but that leaves the
question of where do I put the JAR file and how do I run the JVM such that
it finds the class inside the JAR?
I tried putting the JAR in the local directory and running with a CLASSPATH
set to ., I tried putting the JAR in the org/test directory, I tried
putting the World.jar in the CLASSPATH, and several other permutations, but
I can't find the one that works. Can someone spell it out for me?