• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to determine java -X values  RSS feed

 
john smith
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, simple question (I think - though Ive searched & could not find an answer). I have a command line java program that I sometimes want to attach a debugger to, so I call 'java -cp $classpath -Xdebug -X...etc classname'. By default the class does not wait for input so I have 2 choices:

1. attach the debugger very quickly and hope I attch before my breakpoint is hit.
2. add some code to wait for key input to give me the time to attach.

I use option 2, and pass an extra property via -Dpause=yes. There are other ways I could do this but what I would like to do is find out if java -Xdebug is used instead of having to pass an extra property. Sounds straightforward, and it probably is, but I cannot get it...

any anwers?

thanks
j
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!