To create a debugger launch configuration for a remote Java application with rules, you
use the Remote Java application with Rules item
of the Debug Configurations dialog.
About this task
In Rule
Designer,
you can create a debugger launch configuration for a remote Java application with rules.
Procedure
To define the launch configuration:
- Click .
The Debug
Configurations dialog opens.
- In the Configurations area, select Remote Java
Application with Rules and click New.
A New_configuration item is displayed.
- Enter a name for the configuration in the Name field.
- In the Connect page, click Browse and
choose a Java project from the
list of available Java projects.
Then click OK.
Optionally you
can set a rule project to define a lookup path for Java and source files. You must also specify
the following information:
In the Host field, enter the IP address
or domain name of the host where the Java program
runs. If the program runs on the same machine as the workbench, enter localhost.
In the Port field, enter the port where
the remote VM accepts connections. Generally, this port is specified
when the remote VM is launched. For example: 7777.
Select the Allow termination of remote VM check
box if you want to be able to terminate the VM to which you are connecting.
Note: You must launch the remote JVM with the appropriate
JPDA flag (See http://java.sun.com/products/jpda/doc/conninv.html)
Use
the following JPDA flags to launch the remote application so that
you can later call a debugger via a socket on port 7777.
-Xdebug
-Xnoagent -Xrunjdwp:transport=dt_socket, server=y, suspend=y, address=7777
You
must also set the following flag:
-DIlrEclipseDebugger=true or
activate the debugger in your code using the engine.setDebuggerActivation(true) API.
- In the Source page, uncheck Use
default source lookup path.
- Click the Common tab to change the
launch configuration to either local or shared.
- Click Apply to save your configuration.