Remote debugging tutorial
This tutorial is a feature of JBuilder Enterprise.
This step tells you how to start the RMI registry on the remote computer and start the server in debug mode on the remote computer. You need to be aware of the RMI settings as well as the debug settings in the Java command line that starts the server.
To start the RMI registry on the remote computer,
Jdk1.3\bin
folder.
start rmiregistry
The RMI Registry starts in a separate process. If the registry does not start, you may be out of available memory. Exit other applications that may be running, close the DOS window or command shell and try again.
To start the server on the remote computer,
command.
For NT computers, enter cmd.
Jdk1.3\bin
folder is in your path.
RMI
sample.
java -classic -Xdebug -Xnoagent -Djava.compiler=NONE -Djava.rmi.server.codebase=file:/rmi/classes/ -Djava.security.policy=file:/rmi/SimpleRMI.policy -Xrunjdwp:transport=dt_socket,server=y,address=5000,suspend=n -classpath d:\rmi\classes com.borland.samples.rmi.SimpleRMIServer
Parameter | Description |
---|---|
java |
The command to run the Java VM. |
-classic |
Instructs the debugger to use the classic VM instead of the HotSpot VM. |
-Xdebug |
Runs the VM in debug mode. |
-Xnoagent |
Do not use debug agent. |
-Djava.compiler=NONE |
Do not use any JITs. |
-Djava.rmi.server.codebase=
|
Identifies the location of the server's class files. |
-Djava.security.policy=
|
Identifies the location of the java security policy file. |
-Xrunjdwp:transport=dt_socket,server=y,
|
Debugger options, where:
|
-classpath d:\rmi\classes |
The class path. |
com.borland.samples.rmi.SimpleRMIServer |
The runnable server file (includes the package name). |
In the next step, you'll use the debugger to attach to this running server and step into the server's getDate()
method where the cross-process breakpoint was set.