help! bug in kaffe's getResourceAsStream() method!

Moses DeJong dejong at
Sun Dec 13 14:18:32 PST 1998

Hi all.

I got kaffe 1.0.b3 to compile on a solarix 2.6 sparc machine but
when I attempted to run a simple java application I ran into a
bug in kaffe. There is a big problem with the
Class.getResourceAsStream() method. Here is a small example that
shows what is going wrong. The code calls getResourceAsStream to
read a resource out of a .zip file.

% setenv CLASSPATH

% /soft/java/JDK-1.1.6/bin/java easy
92 bytes available
easy as pie in the sky
easy as pie in the sky
easy as pie in the sky
easy as pie in the sky

% /tmp/mo/install_kaffe/bin/java easy
resource not found

I also noticed that the jar program does not seem to work.

mo(/tmp/mo/jar_bug)% jar -tf 
java.lang.NoClassDefFoundError: sun/tools/jar/Main
        at java/lang/Throwable.<init>(37)
        at java/lang/Error.<init>(21)
        at java/lang/LinkageError.<init>(21)
        at java/lang/NoClassDefFoundError.<init>(21)

I have attached a small .zip file which has the files
I used in the above example. These files are included:


In case the mailing list does not take attached files
I have also placed the zip file up on my website.

I am going to try to find out what is going on but I have
never worked on kaffe before so if someone knows how to
fix this problem PLEASE send me an email and tell me how.
I also noticed that if the files are not in a zip archive
then both the kaffe and JDK run the program correctly.

mo dejong
dejong at

More information about the kaffe mailing list