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
239 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
  • 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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
java 8 lambda expresssions exception handling 3 88
Java Jpanels and Jframe 8 32
Java Loop 6 59
sql import cannot be resolved jsp 3 17
This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
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…
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

813 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now