This week's book giveaway is in the JavaScript forum.
We're giving away four copies of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js and have Paul Jensen on-line!
See this thread for details.
Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Eclipse - RMI debugging  RSS feed

 
Tim Holloway
Bartender
Posts: 18660
71
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
Bartender
Posts: 18660
71
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.
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!