*
The moose likes Distributed Java and the fly likes RMI loads classes from application running on localhost Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI loads classes from application running on localhost" Watch "RMI loads classes from application running on localhost" New topic
Author

RMI loads classes from application running on localhost

Prafull Prashant
Greenhorn

Joined: Jan 15, 2010
Posts: 8
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?


Prafull

SCJP
Edward Harned
Ranch Hand

Joined: Sep 19, 2005
Posts: 291

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.


Ed's latest article: A Java Parallel Calamity http://coopsoft.com/ar/Calamity2Article.html
Prafull Prashant
Greenhorn

Joined: Jan 15, 2010
Posts: 8
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).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: RMI loads classes from application running on localhost
 
Similar Threads
Locating rmi registry over the network
RMI binding problems
RMI problem
how ejb is related for distributed appications ?
server/alone command line