aspose file tools*
The moose likes Distributed Java and the fly likes Deploying an RMI application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Deploying an RMI application" Watch "Deploying an RMI application" New topic
Author

Deploying an RMI application

Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi All,

I have read about the concepts of RMI. I have understood its concepts and the program.

If I want to run it in a standalone computer then its fine, but I want to run it in a networked environment then please do let me know how to deploy the RMI application. I would like to know how to transport the .class files which are needed on server and client computer.

Please do explain me and also do provide me the link where I can find more details on this.

Thanks and Regards,
Siddharth
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

You don't need to know how to transfer the .class file from the client to the server as long as you have the stub in your client and make sure the server is running. The stub is responsible of making a network communication with your server.

You may want to read this.

Hope it helps.


SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi Freddy ,

I had already read this, but couldn't understand much of it.

I would not like to use a command line utility rather I would like to use an eclipse plugin.

This tutorial talks about a web server in a networked environment. I would like to know what's the role of web server here and which files do we transfer to the web server.

For e.g. if I want to make a chat server using RMI then which java files would be on the server and which files should be on each client and how do I make each client download the respective files.

This is my main cause of confusion.

Thanks
Siddharth
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi All,

Any update on this?

Please provide me the information about deploying an RMI application in a networked environment.

Thanks
Siddharth
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Siddharth Bhargava wrote:Please provide me the information about deploying an RMI application in a networked environment.


Why do you want to do this? Most folks these days pass messages back and forth, not Java objects.

RMI can be made to work, but I'm not convinced that its worth the trouble most of the time.
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi Pat,

I would like to build a chat application using RMI.

For this, I would need a server on one computer and various clients connecting to the server from various other computers in a networked environment.

Please help me

Thanks
Siddharth
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Siddharth Bhargava wrote:I would like to build a chat application using RMI.


I see this as two possible questions:

1) I would like to build a chat application.
2) I would like to build a chat application using RMI.

I would strongly recommend that you phrase it as #1, and don't use RMI. You can much more easily write a chat application without all the baggage and complexity of RMI. It would be a better application. And you could do things like write the server side using Java and offer many implementations of the client in Java and python and perl and c#, etc.

So the question is, do you "require" RMI because of an external complain, say this if for a class assignment ?
or do you think you need RMI because you don't know how to start doing it another way?
Siddharth Bhargava
Ranch Hand

Joined: Feb 23, 2007
Posts: 266
Hi Pat,


I would like to built a chat application using RMI as it would solve my purpose of learning RMI and using it in a networked environment.

I am not doing it for any class assignment. Also I know how to do it in other ways, its just that it would help me in learning RMI in a networked environment.



Thanks
Siddharth
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4659
    
    5

Siddharth Bhargava wrote: Also I know how to do it in other ways, its just that it would help me in learning RMI in a networked environment.


In that case, I'll be quiet and let someone else help.
Sagar Patel
Greenhorn

Joined: Oct 09, 2009
Posts: 7
I am not a pro with RMI, however,
from the little I know about RMI...

You need the the RMIserver, RMIimplementation, and RMIclass files at the server.....
and RMIclass, and RMIclient at the client side...!!

P.S.
RMIServer - the class that binds the class
RMIimplementation - the class that has the implementation of the class
RMIclass - the class that has the interface
RMIclient - name is suggestive...
 
 
subject: Deploying an RMI application