• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

how to determine java -X values

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Not so fast naughty spawn! I want you to know about
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic