Speicherzugriffsfehler
Godmar Back
gback@cs.utah.edu
Sat Apr 1 00:00:00 GMT 2000
Btw, technically, Speicherzugriffsfehler means "memory access error (or
violation)". But in reality, it's a segfault.
>>> Lukas WeberruÃÂ writes:
> > Where is my problem ?
>> Is CLASSPATH set to point to some non libgcj archive (entry 5.1 of the
> FAQ?)
>
In Kaffe, when we got tired of people using the wrong Klasses.jar or
classes.zip or whatever, we added a consistency check to our classes.
We did this by adding a private static int field KAFFE_VERSION to a
class that's loaded early on (say java.lang.Cloneable). This not only
allows us to detect if somebody's trying to use Sun's classes.zip, but
also if people try to use earlier, incompatible versions.
Maybe that's a technique that gcj could employ as well (or a variation
thereof.) It doesn't catch all cases, but we haven't heard anybody having
this problem since. Kaffe then prints a long error msg that's really
verbose and explanatory.
Related: it would be really, really nice if gcj supported the equivalent of
a -verbose option that shows exactly from which .jar file or which
directory location a .class file is read during compilation.
I saw a debugging option in the front-end that seemed to be doing something
similar, but I don't think it was quite adequate; plus I think
it should be a run-time option that's compiled in by default.
- Godmar
More information about the Java
mailing list