Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse - RMI debugging

 
Tim Holloway
Saloon Keeper
Pie
Posts: 18012
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anyone got any good tricks for debugging RMI servers in Eclipse? I have no problems with RMI itself, but I'm using RMIC to launch the server in its own JVM on demand and that JVM's not connected to the Eclipse debugger.
 
Tim West
Ranch Hand
Posts: 539
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried starting Java with debugging turned on:

-Xrunjdwp:transport=dt_socket,address=7500,server=y,suspend=n

And then using remote debugging in Eclipse? (Run->Debug...->Remote Java Application->New)

I've not used RMI but it sounds like that might help.


--Tim
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18012
47
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only real problem with that is that the RMID server is spawning a JVM for the service to run in, and I can't tell off the top of my head where I'd put the startup parameters for the spawned JVM.

Fortunately, I was able to peel the top-layer code out so that the RMI server-side code is now just a facade that delegates to a "normal" Java class that I can launch via a main() method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic