This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes debug options while running from command line Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "debug options while running from command line" Watch "debug options while running from command line" New topic
Author

debug options while running from command line

bob szypula
Greenhorn

Joined: Feb 19, 2011
Posts: 5
..i am just beginning java and i am currently working from a text file and command line to compile and run.....
my question is whether there is a way using this method (as opposed to an IDE which i will do later) to show my
program variables in the command window while i am executing i guess in other words is there some sort of debug option or
is that strictly why there are IDES ???

thanks
Chiranjeevi Kanthraj
Ranch Hand

Joined: Feb 18, 2008
Posts: 289

bob szypula wrote:..my question is whether there is a way using this method (as opposed to an IDE which i will do later) to show my
program variables in the command window while i am executing
thanks


i use System.out.println() to watch program variable if i am running from command line


-Chiru
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

There is a tool included in the JDK called jdb. It's a debugger that works on the command line. It's much more primitive than debuggers that are built-in into IDEs, and I don't think many people are seriously using jdb to debug their code. It could be handy though, if you need to test something for example on a server where you have no graphical user environment.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41073
    
  43
For something more powerful than jdb, there's the very capable JSwat debugger.


Ping & DNS - my free Android networking tools app
bob szypula
Greenhorn

Joined: Feb 19, 2011
Posts: 5
thanks for those suggestions!!
 
wood burning stoves
 
subject: debug options while running from command line
 
Similar Threads
Debugging java on unix
J2ee debug
Can We do a System.out.println() to a Console Window Inside Applet
Providing command line arguments to Java Program in Websphere
How can that possible compile???