Lab 2 - Java RMI

Lab tasks

The tasks for today are:

Java RMI

Java RMI (Remote Method Invocation) is a system for distributed objects and remote procedure calls in Java. It is part of the standard JDK distribution.

Example Source

Download source code from https://d3s.mff.cuni.cz/teaching/nswi080/labs/ . Unzip the code and explore the sources in the Example directory.

Note that for simplicity, all classes are in the default package.

Scripts

Note that for simplicity, all programs run with the same classpath, where all the classes can be found.

Running the example

  1. Compile the programs
  2. Run the registry
  3. Run the server
  4. Run the client

Lab Activity

As a required Lab activity task, change the client to connect to our server. The RMI registry is running at lab.d3s.mff.cuni.cz:5000.

Run the client and e-mail the output of the program to the lab assistant (who will respond with a confirmation).

Read the homework assignment

Follow the link from https://d3s.mff.cuni.cz/teaching/nswi080/labs/.

Explore assignment source code

The code provided in Homework-Input is a local implementation your task is to extend this implementation with RMI according to the assignment.