• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

RMI - Remote Method Invocation

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 300
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 300
Eclipse IDE Firefox Browser Linux
 
Rancher
Posts: 1776
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The service name in the Client.java is different than hosted in the Server.java. It should be

 
Marshal
Posts: 79180
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As with your other thread, I am moving it.
 
You’ll find me in my office. I’ll probably be drinking. And reading this tiny ad.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic