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
236 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…

706 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

20 Experts available now in Live!

Get 1:1 Help Now