Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
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
Medium Priority
?
248 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 2000 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

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
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 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…
Suggested Courses

636 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