Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

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: 75707
354
  • 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 had your fun. Now it's time to go to jail. Thanks for your help tiny ad.
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic