Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Jrun, Java Debugger:  Getting them to play with each other

Posted on 2004-11-29
Medium Priority
Last Modified: 2012-08-13


A company I am working for is using JRun 3 ( they have
plans for moving to JRun 4, but it is going to take a
while ).

I am using a multipurpose IDE called Visual Slickedit 9.0
that comes with a java debugger ( it looks like a front
end to the jdk that comes with the jsdk ).

I am having trouble attaching the debugger to the remote
jvm for a JRun webapp/site.

The directions (below) that come with Visual Slickedit call
for feeding the remote vm some special arguments and
restarting it.

I am going to the "java arguments" field in my web app and
inserting the following string ( adjusting for the port
of the web app):

-Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000

Once I do however, I can't get the webapp to restart.

Do I need to prepend "java" to the string above?

If not, what do I need to do to get the java debugger
and the JRun 3 web app talking to each other?

Thanks in advance for any insights or information.


( from the slickedit help section ):

Attaching to a Remote VM (Java Only)

To attach to a remote VM:

1. Start the remote VM with command arguments similar to the following:

Java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,

suspend=y,address=8000 MainClass Arg1 Arg2

2. Choose Attach to Remote VM\u2026 from the Debug menu.
Question by:Steve34
  • 3
  • 2
LVL 13

Accepted Solution

petmagdy earned 1500 total points
ID: 12699221
I don't know what u mean by:
>>I am going to the "java arguments" field in my web app and
inserting the following string ...

but what i know that u should modify ur JRUN startup batch to add this to the JRun JVM initiator
1. Goto $JRUN_HOME/bin
2. Copy jvm.config to jvm.config.bak
3. Using the editor of your choice, open jvm.config
4. Locate the line starting "java.args"
5. Set this line to the following:

java.args=-Xmx128M -Xms128m -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp

(all on one line)
(change settings for -Xmx and -Xms as needed)

6. Save the file

restart JRUN

then configure ur IDE to use the debug method as u say:
>>2. Choose Attach to Remote VM\u2026 from the Debug menu.

for more info refer:


configuring the JRUN to support remote debbuging is the same no matters what IDE u use

Author Comment

ID: 12768779
by "java arguments"  I mean a text field in the JRun administrator website you get with JRun

Within my admin page I have several "servers" set up, each with what jrun calls a web app, an actual site.

Each thing JRun ( 3.0 ) calls a server has a javascrpt tree that will bring up a web form for configuring it.  "java arguments" is such a field.

but what i know that u should modify ur JRUN startup batch to add this to the JRun JVM initiator
1. Goto $JRUN_HOME/bin
2. Copy jvm.config to jvm.config.bak

I have no such path/file with  Jrun 3.0 installation.

However I did find "java.arg" in JRUN_HOME\servers\MyServer\local.properties

I put your string in, but I got a 'port is in use' error when I put the port  of the "server"  or web app in.   I got it to work using a completely new port number.    Will the debugger go to the right place?

The debugger wouldn't let me set a break point at a variable in my *.jsp that was outside of a function.   Is there a way around this?

For servlest, I guess I would just set my breakpoint in doGet or doPost right?

Almost there, thanks the help

LVL 13

Assisted Solution

petmagdy earned 1500 total points
ID: 12769840
yes as long as u specify the right configured debbuging port in ur compiler or IDE (not the HTTP port offourse)

Author Comment

ID: 12826667
I got it working for a JSP.

How would I debug a jsp site that also uses a servlet that is packed in a jar?

Could I use any copy of the *.java file for the service to run the debugger?
LVL 13

Expert Comment

ID: 12827569
if u have the servlet source, put break points inside ur servlet

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question