File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes jdb & Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "jdb & "Java Cookbook"" Watch "jdb & "Java Cookbook"" New topic

jdb & "Java Cookbook"

William Barnes
Ranch Hand

Joined: Mar 16, 2001
Posts: 986

Am trying to learn how to use jdb (I know how to use dbx) and recipe 1.12 in "Java Cookbook" isn't working as advertised.
The example has you write a program with compile errors, 1] run it with "java programnamewithnoextension" which correctly generates an exception error message than, 2] "jdb programnamewithnoextension" which can't find the class file as one was never created. The book pretends that the debugger starts up and reads in the program at that point.
My problem with trying to understand how to work jdb is that there are all sorts of threads running around. Which confuses me.
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451
Welcome to the world of parallel processing! jdb sux when it comes to debugging multi-threaded applications. But, almost all debuggers suck when it comes to multi-threaded applications. You almost have to employ medieval technologies like verbose log files to trap bugs in threaded apps.
I agree, jdb is not much fun to use.

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
I agree. Here's the link:
subject: jdb & "Java Cookbook"
It's not a secret anymore!