aspose file tools*
The moose likes Beginning Java and the fly likes Runtime logs Query Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Runtime logs Query" Watch "Runtime logs Query" New topic
Author

Runtime logs Query

Ra Sank
Greenhorn

Joined: Jun 02, 2008
Posts: 14
Hi,

Is there any "options" in below syntax for getting logs which contains all the method it reaches or touches on its execution in console.

java -"x" <jar file>



Note: If it is available in any links containing all options also please provide.

Thanks in Advance.


Learning Java.
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Are you trying to get a trace of your program?
This may not be an elegant or sophisticated solution, but you can try the Trace demo program
that comes with the jdk.

This is what you have to do.

-Assuming you are using jdk 1.6, extract the source files in demo\jpda\examples.jar
-you can either use the jar utility or a file extractor that supports the zip format to extract
-compile the classes under \com\sun\tools\example\trace. You may need to have \lib\tools.jar in your
classpath for the compilation
-Run your program as java com.sun.tools.example.trace.Trace HelloWorld. You need to have \lib\tools.jar. You can use the -output option
to Trace, to send the trace to a file.

Refer this
and this here to for additional help.

As for the -X option you are looking for.. I don't think there is such an option.

Hope this helps..
Ra Sank
Greenhorn

Joined: Jun 02, 2008
Posts: 14
Thanks for your updates. Please suggest if anything wrong in below syntax.

java -output "class of mine with args".
Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Ummm..

It should be...

java com.sun.tools.example.trace.Trace -output trace.txt ClassOfYours yourargs
 
Consider Paul's rocket mass heater.
 
subject: Runtime logs Query