• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI loads classes from application running on localhost

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 291
Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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).
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic