# Using Oracle's JVM with Oracle9i Application Server for Servlet Debugging

To use Oracle's JVM debugging protocol, you'll need to change the JVM that Oracle9i Application Server (9iAS) uses, modify the parameters you send to the JVM, change the ApJServerAction entry, add servlet init parameters, and modify the `CLASSPATH` for Apache JServ.

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

#### Changing the JVM

- In the `jserv.properties` file, set the `wrapper.bin` parameter to the full path of the JDeveloper JVM (`java.exe`). For example,

  >     wrapper.bin=C:/Program Files/JDeveloper 3.2/java1.2/bin/java.exe

#### Setting parameters

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

  >     wrapper.bin.parameters=-XXdebugondemandquietport4000

  The `-XXdebug` parameter options are the following:

  `ondemand`

  > Start the java program right away and allow a debugger to connect any time. The default is the Java program stays halted until a debugger is connected.

  `port4000`

  > Debugger must connect at the specified port. The default port is 4000.

  `quiet`

  > Don't print connection messages. The default is connection messages are sent to standard error.

#### Changing the ApJServerAction entry

- In `jserv.conf` comment out any existing `ApJServAction .jsp` entries by putting a `#` at the beginning of the line:

  >     #ApJServAction .jsp /servlets/org.gjt.jsp.JSPServlet

- Add a new `ApJServAction .jsp` entry:

  >     ApJServAction .jsp /servlets/oracle.jsp.JspServlet

#### Adding servlet init parameters

- In the servlet init parameters section of the `zone.properties` file, add the following lines:

  >     servlet.oracle.jsp.JspServlet.initArgs=emit_debuginfo=true
  >     servlet.oracle.jsp.JspServlet.initArgs=jspcompiler=oracle.jdeveloper.jsp.JspOjcCompiler
  >     servlet.oracle.jsp.JspServlet.initArgs=classpath=C:\Program Files\Oracle\JDeveloper 3.2\java1.2\jre\lib\frt.jar

#### Setting the CLASSPATH

1. In `jserv.properties`, set `wrapper.classpath` to include the following JDeveloper archives:

   >     wrapper.classpath=C:\Program Files\Oracle\JDeveloper 3.2\jswdk-1.0\lib\servlet.jar
   >     wrapper.classpath=C:\Program Files\Oracle\JDeveloper 3.2\lib\jdeveloper.zip
   >     wrapper.classpath=C:\Program Files\Oracle\JDeveloper 3.2\lib\ojsp.jar

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

   >     wrapper.classpath=C:\Program Files\Apache\JServ\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 JPDA with Oracle9i Application Server for Servlet Debugging