This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Distributed Java and the fly likes rmi Unknown host Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "rmi Unknown host" Watch "rmi Unknown host" New topic
Author

rmi Unknown host

mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 250
hi

i begin with rmi...

i tried the sun turorial
http://java.sun.com/docs/books/tutorial/rmi/index.html

now i try to run the server...
http://java.sun.com/docs/books/tutorial/rmi/running.html



i get the error



when i compiled class, i don't get any errors...

i tried to change log-a3326-12 to localhost... but i get the same error...

any idea?
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Change the string in the engine.ComputeEngine class at line 25 -


from "host" to your real host name.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 250
ok the server run now... it display me: ComputeEngine bound

for the client

in my folder
/home/sonia/src/client

i have ComputePi.class

in my folder
/home/sonia/public_html/classes
client
compute.jar
java.policy

in my folder
/home/sonia/public_html/classes/client
Pi.class

now i try to run the client, i get:



any idea?

the client and server are on the same host...
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Are you setting the classpath to find the stub before running the client?

If you're doing dynamic classloading, is the HTTP server running, and is the code at the URL the client is specifying?
mark smith
Ranch Hand

Joined: Apr 05, 2005
Posts: 250
Originally posted by Nathan Pruett:
Are you setting the classpath to find the stub before running the client?

If you're doing dynamic classloading, is the HTTP server running, and is the code at the URL the client is specifying?


the problem was i not copied the stub on the client...
i don't understand why i need to copy it... i thinked the client download it from the server...

thanks
[ January 12, 2006: Message edited by: Marc collin ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: rmi Unknown host