This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: NewBie question: Segmentation faults
Alexis Denis wrote:
> I get the following:
> HelloWorld.java:0: Can't find default package `java.lang'. Check the
> CLASSPATH environment variable and the access to the archives.
> 1 error
It sounds like gcc was not installed in the same place as libgcj, or perhaps
it was not compiled correctly. gcj *should* be able to find its classes, but
if it can't you can use CLASSPATH to help it out.
> >
> > Failing that, point it directly at libgcj.zip.
>
> I then did:
> export CLASSPATH=/usr/local/share/libgcj.zip
> It compiles fine but it still segfaulted. Do you think I should compile gcj
> myself?
>
> > If that fails, send a stack trace.
>
> Sorry how do I do that?
Using gdb:
$ gcj -g --main=HelloWorld -o HelloWorld HelloWorld.java
$ gdb ./HelloWorld
"run"
"bt" when it crashes. Send us the output.
Is suspect your problem is the garbage collector. You may want to try a newer
libgcj snapshot, which has a new gc version and some PPC fixes.
regards
[ bryce ]