Fwd: Status of gcj/java on PPC Linux?
Kevin B. Hendricks
Fri Feb 9 10:35:00 GMT 2001
I used gdb to track back the cause of gij not being able to find the class.
The problem seems to come in gcc/libjava/java/net/URLClassLoader.java in line
The file was found correctly, the io stream was opened and read but just but
just as we are about to return an object:
Line 250 return defineClass (name, data, 0, len);
The code goes to create and object and then to the dl-linker and seems to die
out there someplace.
Anyway, I can't continue to debug the closure interface without being able to
at least load a class.
Any help you might have here would be greatly appreciated.
// and finally, we can implement our class loader functionality.
protected Class findClass (String name)
if (name == null)
throw new ClassNotFoundException ("null");
URL u = getResource (name.replace ('.', '/') + ".class");
if (u == null)
throw new ClassNotFoundException (name);
URLConnection connection = u.openConnection ();
InputStream is = connection.getInputStream ();
int len = connection.getContentLength ();
byte data = new byte[len];
int left = len;
int off = 0;
while (left > 0)
int c = is.read (data, off, len-off);
if (c == -1 || c == 0)
throw new InternalError ("premature end of file");
left -= c;
off += c;
return defineClass (name, data, 0, len);
More information about the Java