# Using JPDA with Oracle9i Application Server for Servlet Debugging

To use JPDA debugging protocol, you'll need to modify the parameters you send to the JVM, change the `ApJServerAction` entry, tell the server how to find the JDPA library, add servlet init parameters, and modify the `CLASSPATH` for Oracle9i Application Server (9iAS).

These changes must be made on the computer that is hosting 9iAS. You will need administrator or root permission to make these changes.

#### Setting parameters

- In `jserv.properties`, set the `wrapper.bin` parameter to:

  >     wrapper.bin.parameters=-classic
  >     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000
  >     -Xdebug
  >     -Xnoagent
  >     -Djava.compiler=NONE

  To see the invocation options for JPDA, see Sun VM Invocation Options.

  If you are running on Solaris, you may also need to include `stdalloc=y` as part of the `-Xrunjdwp` paramater, like the following:

  >     wrapper.bin.parameters=-classic
  >     -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=4000,stdalloc=y
  >     -Xdebug
  >     -Xnoagent
  >     -Djava.compiler=NONE

#### Adding the JPDA library

- If 9iAS is running on Windows, set `wrapper.path jserv.properties` to include the location of `jdwp.dll` (This file is is part of the Java Platform Debugging Architecture):

  >     wrapper.path=D:\jpda\bin

- If 9iAS is running on UNIX:

  >     setenv LD_LIBRARY_PATH /home/jpda/lib/sparc:$LD_LIBRARY_PATH
  >     setenv PATH /home/jpda/bin:$PATH

  where `/home/jpda` is the path to your JPDA installation. In addition, you will have to pass that environment variable through Apache to the JVM. To do that, in `jserv.properties`, add the following line:

  >      wrapper.env.copy=LD_LIBRARY_PATH

#### Setting the CLASSPATH

1. In `jserv.properties`, set `wrapper.classpath` to:

   >     wrapper.classpath=C:/Program Files/Oracle/JDeveloper 3.2/jswdk-1.0/lib/servlet.jar

2. Make sure that the location of `ApacheJServ.jar` is specified.

   >     wrapper.classpath=C:/Program Files/Apache JServ 1.1b3/ApacheJServ.jar

3. Comment out the location of `jsdk.jar`:

   >     #wrapper.classpath=C:/jsdk2.0/lib/jsdk.jar

Related Topics:
Configuring Oracle9i Application Server for Remote Debugging Servlets
Using OJVM with Oracle9i Application Server for Servlet Debugging

External Links:
Sun VM Invocation Options