Debugging HelloWorld program
Tom.Williams@diversifiedsoftware.com
Tom.Williams@diversifiedsoftware.com
Wed Oct 11 10:45:00 GMT 2000
Hi! First, thanks to all of you who have helped me get my HelloWorld Java
problem running. It's still not running and I'm trying to run it under
gdb. First, can I use gdb 5.0 or should I install a newer snapshot? Can I
use the standard gdb or is there a gdb that is part of the GCJ development
that I should use instead? Also, I'm finding a call to getenv
("GCJ_PROPERTIES") seems to be taking a little while (I'm not sure if
that's problem)... by a little while I mean it's taking MORE than just one
step to get the environment variable. I'm currently using gdb-5.0 on
RedHat 6.0 w/ a custom 2.2.17 kernel, glibc-2.1.3, gcj-20001002 snapshot
and libgcj-snapshot-2000年10月09日.
I tried setting "LANG=en_US.UTF-8" to get the program to run and it still
isn't running (or I'm just not patient enough). I let the program run for
about an hour or so and it still didn't print out my "Hello World" message.
Again, my program is:
class HelloWorld {
static public void main(String[] args) {
System.out.println("Hello World!");
System.exit(0);
}
}
and my compile line is:
$ gcj --main=HelloWorld HelloWorld.java -o HelloWorld
Currently, I've used this command line for my debugging:
$ gcj -g --main=HelloWorld HelloWorld.java -o HelloWorld
So basically, I want to make sure I'm using a good debugger version and I
need to know if I need to set the "GCJ_PROPERTIES" environment variable and
if so to what?
Thanks in advance!
Peace......
Tom
More information about the Java
mailing list