Results 1 to 4 of 4
Thread: jdb and System.in.read() problem
- 01-01-2012, 03:37 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 2
- Rep Power
- 0
jdb and System.in.read() problem
Hi,
Firstly I have read the following:
how to use jdb.exe
This is the problem I have but I find it difficult to believe there is no other help with this issue.
There appears to be very little help/documentation on jdb. There are no books on amazon dedicated to it.
I expected jdb to be the java equivalent to gdb (which is a complete debugging tool and has loads of books dedicated to it), but I'm beginning to think that it's not.
Searching for "jdb" in google brings as the top result the jdk 1.3 documentation. But when I navigate manually to:
jdb - The Java Debugger
which is the latest release it reads the same thing:
"The Java Debugger, jdb, is a simple command-line debugger for Java classes. It is a demonstration of the Java Platform Debugger Architecture that provides..." (my emphasis)
From the above should I infer that jdb is an example of a debugger for java, but not a production strength one?
If this is the case, is my only option to use an IDE for my debugging (eclipse, NetBeans etc)?
Sorry if this sounds like a rant.
If there is a way to set up my environment to overcome this, then I'd be much appreciative. (oh, I'm using linux)
Thanks
-
Re: jdb and System.in.read() problem
If you look at the reply in the post you referred to, there was an answer given there.
Use a FileReader and FileWriter.
FileWriter (Java 2 Platform SE v1.4.2)
FileReader (Java 2 Platform SE v1.4.2)
InputStream (Java 2 Platform SE v1.4.2)
OutputStream (Java 2 Platform SE v1.4.2)
You can write Strings to text files (log files).
Also, why do you need JDB to debug your program? When you run a java program from command-line, the errors are printed there anyway. Or is it different on linux?
- 01-04-2012, 10:57 PM #3
Member
- Join Date
- Jan 2012
- Posts
- 2
- Rep Power
- 0
Re: jdb and System.in.read() problem
Cheers for the reply.
I don't think the answer given in the previous post answers the issue. It just gives a workaround for a flaw.
Other debuggers can debug that code, ok, they're GUI debuggers, but that's beside the point.
Surely a debugger should be able to debug any java code.
> Also, why do you need JDB to debug your program?
I suppose strictly speaking I don't need JDB. But I do require (self imposed requirement) a command line debugger, and I don't think that's too much to ask. But I can't find any java console debugger other than JDB.
>When you run a java program from command-line, the errors are printed there anyway.
That method is not debugging.
I suppose Sun (or Oracle now) need to answer this question, since they develop the thing.
-
Re: jdb and System.in.read() problem
So I don't know anything about JDB so i'm not much use for you there...
I did however google "jdb debugger" and the 2nd result was a tutorial on using it:
Debug with jdb - JavaWorld
Which may be of more use to you.
Similar Threads
-
System.in.read(); to a char array
By larsjuh in forum New To JavaReplies: 5Last Post: 10-22-2011, 02:26 PM -
System.in.read()
By bhauteshved in forum New To JavaReplies: 1Last Post: 09-08-2011, 03:53 AM -
System.in.read()
By Adithi in forum New To JavaReplies: 3Last Post: 08-07-2011, 05:19 PM -
System.in.read() confusion
By ankurdh in forum New To JavaReplies: 5Last Post: 01-08-2009, 08:28 AM -
System.in.read(); strange error!
By kantze in forum New To JavaReplies: 2Last Post: 03-19-2008, 01:44 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks