Solved

Using Eclipse debugger on a desktop to debug a Java app that accesses a MQSeries queue on a remote server

Posted on 2004-08-21
4
243 Views
Last Modified: 2010-03-31
Hi,

I have a Java application that normally will run on a Solaris server.  When I try to use Eclipse locally to debug it, MQSeries cannot find the queue name because the queue is not local to my laptop.  When I run the Java application on the Solaris server, it does find the queue and processes the messages.

Is there any way for me to utilize the Eclipse debugger locally when the MQSeries queue is not local?

At this time the employees at this client have been using logger debug statements in the code and running it on the Solaris server.  This option is not nearly as powerful as the Eclipse debugger.

Greatly appreciate any help.
 
0
Comment
Question by:lhalkapeel
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 7

Accepted Solution

by:
JugglerW earned 500 total points
ID: 11860689
You can remote debug your application.
Your application runs on the solaris machine and you attach the eclipse debugger on your laptop to the vm running on solaris. Following some links that may help to set up this scenario:

http://help.eclipse.org/help21/index.jsp?topic=/org.eclipse.jdt.doc.user/concepts/cremdbug.htm

You normally have to start the JVM on your remote machine with options like:

java ... -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=8000,suspend=n ...

Details you can find here:

http://java.sun.com/j2se/1.3/docs/guide/jpda/conninv.html#Invocation

but for solaris details also look in your JVM docs and search for remote debug etc.



0
 
LVL 7

Expert Comment

by:JugglerW
ID: 11860696
Here another link with options for 1.4.2:

http://java.sun.com/j2se/1.4.2/docs/guide/jpda/conninv.html
0
 

Author Comment

by:lhalkapeel
ID: 11862012
Thanks,

This worked great.  One other point worth mentioning is that when using remote debugging, one must also ensure that the remote Java code was compiled with the debug option.  I had to alter the ant script to turn on debugging:

 <target name="compile" depends="prepare"
          description="Compiles all source code.">
    <javac srcdir="${src.dir}" destdir="${build.dir}"

debug="true" debuglevel="lines,vars,source" />

Otherwise, Eclipse was complaining about "attempting to install a breakpoint in type "myClass" that has no line numbers.
0
 
LVL 7

Expert Comment

by:JugglerW
ID: 11865432
Thanks :-)
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

An old method to applying the Singleton pattern in your Java code is to check if a static instance, defined in the same class that needs to be instantiated once and only once, is null and then create a new instance; otherwise, the pre-existing insta…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the third conditional statement “else if” and use it in an example program. Then additional information about conditional statements is provided, covering the topic thoroughly. Viewers learn about the third conditional statement …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

691 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