To debug remotely any java application, follow steps as below. For the below demo, we have used Intellij IDEA 2019.1.3 version.
1)Open your source code file and project and then click on Add Configuration as below image.
2) Then the configuration window as below appears, Then expand the Templates and click on Remote and make changes accordingly as below image, then apply and save.
3) Then go to the remote system and apply command as below :
-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=RemoteServer:5005
or if you have any jar file to run manually in the remote system then you may use the below command.
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=RemoteServer:5005 Dctlname=x -jar -Djava.library.path= library.path complete Jar Path
Voila!! Your IDE is ready for remote debugging, then put break point and start debugging.
java -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=RemoteServer:5005 Dctlname=x -jar -Djava.library.path= library.path complete Jar Path
ConversionConversion EmoticonEmoticon