0
votes

I'm unable to debug applet when it is in the WAR file. I use Eclipse IDE and Win8. My java version is 7 15.

I'm going to list my steps and maybe there is something that I do wrong:

1) First of all, I go to "Control panel->Programs->Java", then on "Java" tab I select "View". New window opens.

2) Then I enter the following line into "Runtime parameters": (without quotes) "-Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,address=1888,suspend=n", then I click "OK", "OK".

3) In Eclipse IDE I build war file.

4) Then I navigate to "Servers" tab, right click on my tomcat server and select "Debug". Now I can reach my project on my browser using this address: "localhost:8080/myProjectName".

5) On Eclipse IDE I go to "Run->Debug Configurations...->", then I select "Remote JAVA application" tab. Let's say there are no elements on that tab, so I right click on "Remote JAVA application" and select "New".

6) I set connection type to "Standart (Socket Attach)" and then I set "port" to 1888 and host to "localhost", then I click apply.

7) After clicking apply I do not close that window and I click "Debug". Window closes and IDE spits out error window "Problem occured. 'Launching myProjectName(1)' has encountered a problem. Failed to connect to remote VM. Connection refused."

--- Additional info ---

I use java server pages on this project too and then I set

JPDA_OPTS=-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n

in catalina.bat file and run server from command line by typing

catalina.bat jpda start

I'm able to debug java beans, but not the applets. This is because beans are running on the server side and the applet runs on the user side.

1
This is not an answer, but you should update to a more recent patch release of Java 7 ... especially since you are using it from a browser.Stephen C

1 Answers

0
votes

My whole application or applet was not signed, so my system failed to attach runtime parameters for debugging from Java Control Panel.