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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
arguments to jar 5 40
spring jars download 1 53
Eclipse Java import and method not resolved 4 78
batch vs regular insert in spring DAO 2 23
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…
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
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…
The viewer will learn how to implement Singleton Design Pattern in Java.

749 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