I have a java application running on linux machine. I run the java application using the following:
java myapp -Xdebug -Xrunjdwp:server=y,transport=dt_socke
Steps:
See Step by Step guide on Java remote debugging for full details.