java.lang.ClassNotFoundException:HelloWorldApp

Michael Hirsch hirsch at mathcs.emory.edu
Sun Oct 5 14:32:10 PDT 1997


Okay, I found some of the problem.  I wrote:

>>>>> In article <199710040349.XAA22083 at cssun.mathcs.emory.edu>, Michael Hirsch <hirsch at mathcs.emory.edu> writes:

Michael> I have the same problem that Bryan Felix reported.  I tried
Michael> to follow the README instructions exactly.  I got all four
Michael> tarballs: kaffe-0.9.1.tgz
Michael> kaffe-0.9.1-package-javasoft.com.tgz
Michael> kaffe-0.9.1-package-biss-net.com.tgz and
Michael> kaffe-0.9.1-package-epfl.ch.tgz and unpacked them in the same
Michael> directory.

Michael> ./configure worked fine, as did make and make install.

Michael> But now: 
Michael> [34] test> echo $CLASSPATH $KAFFEHOME
Michael>
.:/usr/local/share/kaffe/classes.zip:/usr/local/share/kaffe/biss.zip /usr/local/share/kaffe 
MIchael> [35] test> pwd
Michael> /usr/local/Uploads/kaffe-0.9.1/test 
Michael> [36] test> kaffe HelloWorldApp 
Michael> java.lang.ClassNotFoundException: HelloWorldApp

This, of course, does not work because the .java file has not been
compiled into a .class file.  Unfortunately, the README file says that
this should work.  Perhaps the next release will add the compiled
HelloWorldApp.class file to the test directory so silly people like me
don't get confused.

I made a compiled the .java file on another system and then tried to
run it and it worked fine.  So the interpreter/JIT seems to be okay.

Next, I tried compiling and that is still broken.  I reinstalled
everything and I still get these errors.  Any further suggestions?
It kind of looks like I don't have something installed, but I
installed all 4 .tgz files.

Thanks,

--Michael

Here are the errors:
[2] test> javac HelloWorldApp.java 
java.lang.NullPointerException
	at java/io/File.list(line unknown, pc 0x8520a6c)
	at sun/tools/java/ClassPathEntry.getFiles(line unknown, pc 0x8532197)
	at sun/tools/java/ClassPath.getFile(line unknown, pc 0x852ddb9)
	at sun/tools/java/ClassPath.getFile(line unknown, pc 0x8530bd6)
	at sun/tools/java/Package.getBinaryFile(line unknown, pc 0x853477a)
	at sun/tools/java/Package.classExists(line unknown, pc 0x852083b)
	at sun/tools/javac/BatchEnvironment.classExists(line unknown, pc 0x852c650)
	at sun/tools/java/Environment.classExists(line unknown, pc 0x8530369)
	at sun/tools/java/Environment.classExists(line unknown, pc 0x8530369)
	at sun/tools/java/Imports.importable(line unknown, pc 0x851ee55)
	at sun/tools/java/Imports.resolve(line unknown, pc 0x852d2db)
	at sun/tools/java/ImportEnvironment.resolve(line unknown, pc 0x8521eb3)
	at sun/tools/java/Environment.resolve(line unknown, pc 0x85205a2)
	at sun/tools/java/Environment.resolveName(line unknown, pc 0x851dea4)
	at sun/tools/java/Environment.resolveName(line unknown, pc 0x851dcca)
	at sun/tools/javac/SourceClass.resolveSuper(line unknown, pc 0x851ecd4)
	at sun/tools/javac/SourceClass.resolveSupers(line unknown, pc 0x852e895)
	at sun/tools/javac/SourceClass.resolveTypeStructure(line unknown, pc 0x852e1bd)
	at sun/tools/javac/SourceClass.basicCheck(line unknown, pc 0x851f971)
	at sun/tools/java/ClassDeclaration.getClassDefinition(line unknown, pc 0x851eb11)
	at sun/tools/javac/Main.compile(line unknown, pc 0x81b9992)
	at sun/tools/javac/Main.main(line unknown, pc 0x81a1d83)
error: An exception has occurred in the compiler; please file a bug report (http://java.sun.com/cgi-bin/bugreport.cgi).
1 error
[3] test> 



More information about the kaffe mailing list