• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI loads classes from application running on localhost

 
Prafull Prashant
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello All,

I have Swing based application which internally makes RMI calls to another component called Manager which is a standalone application.

I have my manager component running on two machines i.e. a server and my localhost development machine. I run my UI application through JNLP wherein code gets downloaded from server machine.

My problem is when i run Manager component on both machines and run GUI, the GUI code makes RMI call to my localhost code instead of server code even though i specifed the host name and code base properly.

why is that so?
 
Edward Harned
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Java always tries to load classes from the classpath first.

Take out the CLASSPATH environment variable. Use -cp for your SWING classes only. That may help.
 
Prafull Prashant
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Edward for your reply. The problem is resolved now. In one of the very specific cases my code was binding to localhost in first attempt before binding to actual server. Hence, it used to get the stubs from localhost machine. It took a lot of time to detect the problem as its very hard to debug a web start application (for me atleast).
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic