code_junkie

Java threads: Is it possible view/pause/kill a particular thread from a different java program running on the same JVM?

Nov 11th, 2011
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888 your.app.Main
  2.  
  3. jdb -attach 127.0.0.1:8888
  4.  
  5. threads
  6.  
  7. kill 0xe2e new java.lang.IllegalArgumentException("er");
  8.  
  9. killing thread: Swank REPL Thread
  10. Thread not suspended
  11. Expression must evaluate to an object
Add Comment
Please, Sign In to add comment