This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Distributed Java and the fly likes RMI server client Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "RMI server client" Watch "RMI server client" New topic
Author

RMI server client

Abdul Ahadone
Greenhorn

Joined: Mar 21, 2012
Posts: 4
Hi,
i m new to java. i need to run this program using RMI. i need to give inputs from server side and get the implementation done at client side and get the result back to server.
i've tried by making client and server's implementation code and interfece code.... using rmi registryalso
But it's not executing...

but i m not getting how to do it...
Can any body help me out of this....


Thanks in advance...
Abdul

Ben Flowers
Greenhorn

Joined: Sep 12, 2011
Posts: 17
I cant see anywhere in the code where you are actually looking up the server from the rmi registry (althoguh i did only havce a quick glance)
In your server code you need to extend UnicastRemoteObject and write the name of the server to the RMIRegistry with Naming.bind() (or use the static methods of UnicastRemoteObject)

Then you need to start the RMIRegistry with either
for linux/mac
or
for windows

Then you can launch your server, which will bind itself to the RMIRegistry.

Once the rmiregistry has been started and your server is online you can run your client.

In your client code you need to use the naming service to lookup your server


if you are doing it over two remote machines then you MUST install a security manager.

Hope that helps
-Ben
Abdul Ahadone
Greenhorn

Joined: Mar 21, 2012
Posts: 4
Will you please tell me how to remove main method in BoyerMooreImpl.java file which is above one.... I need to send parameters directly to calling method not to main method...
So for that i need to remove main method and shift its operations in other methods in it...and also return the values from other method...

This is my server program...:

I have done that,,....
kien kun
Greenhorn

Joined: Feb 15, 2012
Posts: 27
Have many error in your progamming.
You want to run a RMI application.
The first:
Make a interface class extend Remote

After that:

Make a implement from your interface which extend UnicastRemote

When run sever,You have to run rmiregistry
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

Abdul Ahadone wrote:i need to run this program using RMI. i need to give inputs from server side and get the implementation done at client side and get the result back to server.

So is this a homework assignment where your instructor says you must use RMI?

Obviously, you have to do what is asked, but after the assignment is completed, could you ask your instructor why RMI is still being taught?

See the thread in this section: http://www.coderanch.com/t/570237/java/java/Why-there-still-interest-lots
 
 
subject: RMI server client