Just a few points, but no real solution, I'm afraid.

Steve Cohen wrote:

>
> 2) Many wrote about the difficulties with copying files between the two
> systems.  This is not relevant either, since the files actually copied are jar
> files containing the class files.  This should be equivalent to zipping the
> files.

Actually, since a jar file is a binary file (i.e. it uses the 8th bit in each 8-bit
word), you still need to set the transfer mode to binary using FTP.  That said,
copying the file on a disk should work.

> Now here is a detail that may be more relevant:
> There are 19 .java files in the package.  The compilation under linux is making
> them into 19 class files.  When compiling under Win95, 27 class files are
> created.  Two of these are for non-public classes defined in other java files.
> The other six files have names like xxxxx$1.class where xxxxx.java is one of my
> project files (xxxxx.class is also created by the compilation).  I don't know
> what these extra files are for, but the NoClassDefFoundError message is telling
> me that the class it cannot find is xxxxx$1.  The extra files do not seem to be
> required under the linux environment, but they appear necessary under the Win95
> environment.

All of the "xxxx$1.class" files are actually just anonymous classes.  For instance
if you say something like:

button.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {
        // handle the button press here!!!
        System.exit(0);
    }
}

you are actually creating an anonymous class, extended from the ActionListener
class.  In order for Java to do the runtime lookup for this class, javac creates an
artificial class name for this anonymous class, as it does not have its own class
name (hence the label 'anonymous').  The name is created as 'xxxxx$#', where
'xxxxx' is the name of the class that contains the anonymous class, and '#' is the
#'th anonymous class found within the containing class.

As far as moving stuff back and forth between Win95, Linux, Solaris, and NT, I do
this all the time.  I don't have any good suggestions for you, other than to try a
fresh installation of Java on your Windows95 system, and make sure all of the
examples work before you try your own code.  I have had problems with Win95 & Java
when using native code, but these problems were not Java-related (native code
behaves markedly different under Win9x and WinNT, with errant code causing crashes
on Win9x, while running fine under NT).

-dan
[EMAIL PROTECTED]
[EMAIL PROTECTED]

Reply via email to