Subject: [cpsedu] JAR files and Java classes

From: "Tom Scavo" <[email-masked]>
Date: Tue, 21 Jul 1998 12:05:13 -0400

Hi,

I recall some discussion recently about JAR files and Java
classes in the tango mailing list.  I have no idea if I'm
experiencing the same problem, but let me tell you about it so
you don't fall into the same trap.

BOTTOM LINE:  All classes in JAR files should be public!

I have a bunch of classes and test applets in the same
directory.  The classes have package access (that is, no
visibility modifier on the class).  Since they're all in the
same directory, everything works fine, but when I put the .class
files in a JAR file and try to view the applets with
appletviewer or Communicator, I start getting strange errors
(which for Java is unexpected, since error messages are usually
quite good).  To make a long story short, when I declared each
class public, all the errors went away!

Hope this prevents others from experiencing the same frustration
I did.

Cheers,
Tom Scavo