Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

RMI - Remote Method Invocation

 
Ray Dawson
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know this will be really silly question to ask but I have to

I have trying to get this RMI thing to work but I have found that RMI have been changed significantly after Java 5, i.e we don't need to use rmic

Honestly, I have no clue what RMI is all about
So could you someone give me some good tutorials on RMI perhaps very basic ones!

I found a tutorial.

RemoteInterface.java

ServerImplements.java

Server.java

Client.java

Steps for executions

javac RemoteInterface.java

javac ServerImplements.java

rmic ServerImplements

javac Server.java

javac Client.java

start rmiregistry

start java server

java Client

I found this & I implemented the code as one, like

Server



And Client as



When I run this it gives me this error :



Why do I even need to create an extra class for ServerImplements.java.
I don't understand can't we just create our server & specify its location & client simply connects to it ??

And can't we simply run the server.java & then client.java instead of the long process ??

BTW, I'm running this on BlueJ


Sorry, I'm the biggest noob on this forum
 
Javin Paul
Ranch Hand
Posts: 295
Eclipse IDE Firefox Browser Linux
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

In real world you rarely coding RMI with hand there are much better alternatives like web services. even if you need than I would go and use spring framework which will enable RMI with just few configuration without all mess of Remote interface and registry etc.
 
Ray Dawson
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need help with RMI ASAP, I have to use RMI & I dont have any alternatives
 
Javin Paul
Ranch Hand
Posts: 295
Eclipse IDE Firefox Browser Linux
 
John Jai
Rancher
Posts: 1776
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ray Dawson wrote:I need help with RMI ASAP, I have to use RMI & I dont have any alternatives

Please Ease Up... Please quote the source where you took the programs.
 
Ray Dawson
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
John Jai wrote:
Ray Dawson wrote:I need help with RMI ASAP, I have to use RMI & I dont have any alternatives

Please Ease Up... Please quote the source where you took the programs.


http://www.roseindia.net/tutorials/rmi/RMI-Example-1.shtml
 
John Jai
Rancher
Posts: 1776
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The service name in the Client.java is different than hosted in the Server.java. It should be

 
Campbell Ritchie
Sheriff
Pie
Posts: 47262
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As with your other thread, I am moving it.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic