How to Enable remote debugging of a java application
While running the application pass following as JVM argument
-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8765
This will start listening on port 8765, now you may attach remote debugger from any machine giving the IP/hostname and port.