Yes, you can.
Start your JVM with these arguments:
-Xdebug -Xrunjdwp:transport=dt_socket,address=8001,server=y,suspend=n
The address number is the port number that the JVM will listen to connect to the debugger. Set suspend to y if you want the JVM to wait until the debugger is attached before running main .
The debugger must be able to connect to the remote JVM. This should be a simple matter of punching the host number and port.
source share