Java Technology Home Page
A-Z Index

Java Developer Connection(SM)
Online Training

Downloads, APIs, Documentation
Java Developer Connection
Tutorials, Tech Articles, Training
Online Support
Community Discussion
News & Events from Everywhere
Products from Everywhere
How Java Technology is Used Worldwide
 

RMI Parameters


by jGuru

[Exercise | API Docs | Short Course| Exercises]

Help is available for each task.



    Task 1

    Add the getMessageObject method to the Hello interface.


    In the file Hello.java add the following method to the interface definition: MessageObject getMessageObject() throws RemoteException;

    Task 2

    Create an implementation for the getMessageObject method in the HelloImpl class.


    Add the getMessageObject remote method and return a new instance of the MessageObject class.

    You can use the following code:

    public MessageObject getMessageObject() 
                  throws RemoteException
    {
      return new MessageObject();
    }
    

    Task 3

    Compile all of the class files for the server and its remote objects.


    Use the javac program:

    javac *.java

    Task 4

    Create the stub and skeleton files for the remote object implementation.


    Use the rmic utility on the implementation class, HelloImpl.

    rmic HelloImpl

    Task 5

    Start the RMI Server in its own DOS console.


    Start a new DOS console program. Change the current directory to the location of your .java files for the server. Run RMIServer with the java utility:

    java RMIServer

    Task 6

    Start the RMI Client in its own DOS console.


    Start a new DOS console program. Change the current directory to the location of your .java files for the client. Run RMIClient with the java utility:

    java RMIClient

Copyright 1996-2000 jGuru.com. All Rights Reserved.


[ This page was updated: 11-Feb-2000 ]
Products & APIs | Developer Connection | Docs & Training | Online Support
Community Discussion | Industry News | Solutions Marketplace | Case Studies
Glossary - Applets - Tutorial - Employment - Business & Licensing - Java Store - Java in the Real World
FAQ | Feedback | Map | A-Z Index
For more information on Java technology
and other software from Sun Microsystems, call:
(800) 786-7638
Outside the U.S. and Canada, dial your country's AT&T Direct Access Number first.
Sun Microsystems, Inc.
Copyright © 1995-2000 Sun Microsystems, Inc.
All Rights Reserved. Terms of Use. Privacy Policy.