aspose file tools*
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 Spring in Action this week in the Spring 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: 14270
    
  21

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 8 API documentation
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 42285
    
  64
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!!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: debug options while running from command line