Rmi clinet dont lookup!

S

Sadu

hello

I write easy RMI server and client... Every things seems look well but
client dont catch reference to remote object or I dont know what...

I see "Lookuje" on console but "done" dont show...

try{
System.out.println("Lookuje");
TeleBook w = (TeleBook)Naming.lookup("rmi//loaclhost/magazine");
System.out.println("Done");
} catch(Exception e) {
e.toString();
}
}

I have all stub in directory, rmiregister run, please help i dont know what
to do... Next step will be write all again

All source: http://ekontra.com/sadu/DEMO/RMI.rar
 
A

Alex Molochnikov

Sadu said:
hello

I write easy RMI server and client... Every things seems look well but
client dont catch reference to remote object or I dont know what...

I see "Lookuje" on console but "done" dont show...

try{
System.out.println("Lookuje");
TeleBook w = (TeleBook)Naming.lookup("rmi//loaclhost/magazine");

Your server's URL is mangled:

1. it should be rmi://, not rmi// (it is a protocol name, and must follow
the protocol naming rules in URL)
2. The host name should be "localhost", not "loaclhost" - alternatively, you
can use the host's IP address.

Starting up the registry by calling Runtime.exec(), as you do in your Server
object, makes your code platform-dependent (Windows-only). If you want to
run the registry server from your program, try
LocateRegistry.createRegistry().

HTH

Alex Molochnikov
Gestalt Corporation
www.gestalt.com
 
S

Sadu

That mistakes are result of some test I didint check source before packing
sorry...
So that didnt help :(((
 
A

Alex Molochnikov

What exception is thrown? Please post here the program output, at the time
of crash.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top