Java remote debugging not working with Eclipse or IntelliJ . Help needed -
i have simple project here https://github.com/sherry-ummen/javadebuggingnotworking
i trying remote debugging working because need similar case thought of trying out simple one.
i have put break point @ line 12. did maven build create jar , set remote debugging configuration 
, start debugging used following command
java -xdebug -xrunjdwp:transport=dt_socket,address=8998,server=y -jar my-debug-test-0.0.1-snapshot.jar
now when process listening , go intellij , press remote debugging configuration following message on intellij output window without hitting breakpoint.
connected target vm, address: 'localhost:8998', transport: 'socket'
disconnected target vm, address: 'localhost:8998', transport: 'socket'
and in console window started java process gets stopped following message
c:\users\sherry.ummen\eclipse-workspace\my-debug-test\target>java -xdebug - xrunjdwp:transport=dt_socket,address=8998,server=y -jar my-debug-test-0.0.1- snapshot.jar listening transport dt_socket @ address: 8998 no main manifest attribute, in my-debug-test-0.0.1-snapshot.jar now, not understand why behaves way , not see breakpoint hitting. might stupid question have limited java development skills me it's headache.
in case idea or eclipse has connected process. problem , in jar there no defined main class (should defined in manifest). java process stop because has no main class run.
in jar , meta-inf filder, there should file names manifest.mf, in file there should entry this
main-class: mypackage.mymainclass
Comments
Post a Comment