Hi. I'm fairly new to Java, but stumbling along quite nicely, thank
you; but I'm confused about how the VM finds stuff mentioned in
CLASSPATH. Is there an "everything you wanted to know" FAQ, the kind
of thing that when you get done reading it, you wish you hadn't asked?
I guess that if you give a directory, it'll find .class files there
and in appropriate subdirectories, and if you give a .jar file, it'll
find classes there, but is there any more to it? Why are there so
many .jar files? Why are some in ...java/lib, and others in (and
under) ...java/jre/lib? Is it a Bad Idea to unpack them all into a
master tree, then make a giant .jar containing all the .class files?
* * *
I'm having a problem running the BlackBox example from the Sun
javacomm20-sparc package, with the rxtx-1.3-7 JNI module set up to
implement the machine-specific serial interface. Under 1.2-pre2, I
get a "NoClassDefFoundError" for javax/comm/CommDriver while loading
the machine-specific code, but the class actually exists in a jar file
specifically named on the java line. I tried unpacking all the jar
files under /usr/local/packages/java into a temp directory, and that
solves my problem, but I don't understand why the other approach
fails. Any help?
regards,
d.
dhm@vheissu(483)$ java -verbose -classpath
BlackBox.jar:.:/usr/local/packages/java/rte/lib/rt.jar:/usr/local/packages/java/jre/lib/ext/jcl.jar:/usr/local/packages/java/lib/comm.jar
BlackBox 2>&1 | grep comm
[Loaded javax.comm.NoSuchPortException] <---it's finding some javax.comm
[Loaded javax.comm.CommPort] stuff...
[Loaded javax.comm.SerialPort]
[Loaded javax.comm.PortInUseException]
[Loaded javax.comm.SerialPortEventListener]
[Loaded javax.comm.CommPortOwnershipListener]
[Loaded javax.comm.CommPortIdentifier]
[Loaded javax.comm.UnsupportedCommOperationException]
Caught java.lang.NoClassDefFoundError: javax/comm/CommDriver while loading driver
gnu.io.RXTXCommDriver
[Loaded javax.comm.CommPortEnumerator]
dhm@vheissu(485)$ jar tvf /usr/local/packages/java/lib/comm.jar | grep CommDriver
277 Sun Nov 15 15:58:08 PST 1998 javax/comm/CommDriver.class
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]