简体   繁体   中英

Debugging applet in war file using eclipse on win8. java 7 15

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.

我的整个应用程序或applet都未签名,因此我的系统无法附加运行时参数以从Java控制面板进行调试。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM