To solve this problem, you need to carry out these steps.
1)In the eclipse window, click on the debug icon, select "Remote Java Application" from the list of configurations. Right click on the "Remote Java Application" and create a new configuration for your application.
On the right hand side, there will be three tabs, namely "Connect" ,"Source" and "Common". Click on the "Connect" tab and set the connection properties, host as "localhost" and port as "8000".
2) In the enviornment variables, add an entry jpda_address=8000;This is the default connection port used by eclipse when you try to connect to a remote VM for debug.
3)Open catalina.bat (inside the bin folder of tomcat) and search for "set JPDA_TRANSPORT". Set the value to dt_socket.
4)Open startup.bat(inside the bin folder of tomcat) and search for call "%EXECUTABLE%" start %CMD_LINE_ARGS%. Its at the end of the file. Replace this with call "%EXECUTABLE%" jpda start %CMD_LINE_ARGS% (mind the spaces, better copy and paste).
5)Save the changes and start the tomcat server using its startup.bat file. The first line appearing on the server window should be "Listening for transport dt_socket at address: 8000. This indicates that all is well..:-). Go to eclipse debug perspective, add breakpoints and start debugging...:-)
This in my opinion a small Eclipse glitch.
I was running my applet fine and allof a sudden got this error after adding another applet to debug.
I made it work by selecting Debug As.. instead of Debug
or after that with Debug:
Making sure to select the applet and not the Remote Java Application before clicking Debug
I tried your solution but there is no catalina.bat file in the bin directory of tomcat. I'm using tomcat 6.0. I don't know how to fix this problem. The following is the code which I've used to define a servlet class:
start "Configure Tomcat". Go to Java tab. add the following 2 lines.
Then go to Startup tab and add the following two lines in the arguments entry box.
This works great for me except that I also had to set the port by default tomcat wasn't using 8000 but 1100 - maybe I have a newer version of tomcat. Setting the variable JPDA_ADDRESS in catalina.bat from JPDA_ADDRESS=jdbconn to JPDA_ADDRESS=8000 seemed to do the trick. I guess I could have also just changed the port eclipse was connecting to in the debug options too.
Hi, I have one question to raise on this issue, when you say eclipse can run only @ port 8000. Where do we need to give the remote server's port details? Assume a server called x.y.com is available and the weblogic( 2 instances) runs @ port 8040, and 8030 also. If this is the setup I have then how does eclipse know which server to debug which is running in 8040 & 8030 also.