On Wed, Jul 19, 2000 at 03:54:40PM +0000, Kris Heyrman wrote:
> Hi,
>
> I think I am getting stupid: I just spent a day trying to find out how best to
> debug a project that is getting fairly complicated, in Java. I did not find out
> how, so I am asking the question. Hopefully, somebody can give me a hint.
I've had some success using the Inprise JBuilder product (personal
edition is free), although I still do most of my debugging with print
statements. A surprising number of other developers I've talked to,
working on various platforms, say the same thing. Bottom line: the
state of debugging technology is depressing.
Nathan
>
> 1. I am using Sun JDK 1.2.2 ("Java 2 Standard Edition JDK 1.2.2 RC1") on Linux
> Red Hat 6.2 and my source files are spread out over a directory tree. Kernel is
> 2.2.14-12 and glibc is 2.1.3-15.
>
> 2. Sun's JDB works but stubbornly refuses to find my source files. Used either
> with the option 'sourcepath .:mydirs' or with the JDB command 'use .:mydirs',
> it fails to find the .java files and debugging is no fun like that.
>
> When asked which sourcepath it uses, it always says: '.'.
>
> 3. I also have Sun's JDK 1.3 beta but it has the same JDB (99/06/11) and it
> does not work at all. (Sun says so in its announcement).
>
> 4. I tried using gdb with a complex arrangement involving green threads:
> export JAVA_HOME=$JAVA
> export JAVA_COMPILER=NONE
> export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/classes.zip
> export LD_LIBRARY_PATH=\
> $JAVA_HOME/jre/lib/$PROCESSOR/native_threads:\
> $JAVA_HOME/jre/lib/$PROCESSOR/classic:\
> $JAVA_HOME/jre/lib/$PROCESSOR:\
> $LD_LIBRARY_PATH:
> COMMAND="gdb $JAVA_HOME/bin/$PROCESSOR/native_threads/java"
>
> When running, it give a lot of unwanted dumps of SIGQUIT scrolling over the
> screen.
>
> 5. I did the same with native_threads: I gives a
>
> (gdb) run
> Starting program: /usr/local/jdk1.2.2/bin/i386/native_threads/java
> [New Thread 18444 (manager thread)]
> [New Thread 18437 (initial thread)]
> [New Thread 18445]
> [Switching to Thread 18445]
>
> Program received signal SIGSYS, Bad system call.
> 0x400c7deb in __sigsuspend (set=0xbf7ffc94)
> at ../sysdeps/unix/sysv/linux/sigsuspend.c:48
> 48 ../sysdeps/unix/sysv/linux/sigsuspend.c: No such file or directory.
>
> 6. Tried the IBM jikes debugger, but it will only run with JDK 1.1.6.
>
> 7. Saw that GNU has a new java compiler jcl and a simple HOWTO on how to use it
> with gdb, but it will not compile even JDK 1.1 features like anonymous inner
> classes.
>
> I would be thankful to anybody who can spot my mistakes, or even better:
> suggest how to do useful debugging of Java on Linux in my situation.
>
> Kind Regards,
>
> --
> Kris Heyrman.
> Ottergemsesteenweg 337, B-9000 Gent. Phone: +32.9.221.79.69
> Mobile: +32.495.380.128
> "L'an 0. On arrète tout, puis on réflechit. Et c'est pas triste."
>
>
>
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]