RMIWizard Tutorial for Win32 System

If you haven't downloaded the RMIWizard, you can download here.

When you downloaded the RMITool.jar file, please save it in your local directory. On command line in that directory, unjar it:

>jar -xf RMITool.jar

The following files are the unjarred files in your local directory. These files provided for you to try the first RMI system and learn the RMI technology from the generated code.

RMIWizard.jar
ReadMe.txt
BankAccount.java
BankAccount.class
my.policy
logo.gif
logo2.gif

In that directory, to run RMIWizard, on command line type:

>java -jar RMIWizard.jar

The following screen is shown up: RMIWizard Tutorial Screen Shot Diagram

Click the Start button, you will see the following screen. RMIWizard Tutorial Screen Shot Diagram

We will use it to make our BankAccount RMI system workable. Right now, we only use a compiled BankAccount class file to generate RMI system.

  1. Choose an interface name. We choose BA.
  2. Choose a policy file. Use the supplied policy file my.policy
  3. Choose local class. Click Browse button to select BankAccount.class file. NOTE: you cannot choose BankAccount.java file. Only compiled file or class file will make it work.
  4. Click List button. All public methods in the BankAccount.class file will be listed here.
  5. Use localhost and 1099 as default
The following screen is the right screen before you click the Create button. RMIWizard Tutorial Screen Shot Diagram

Now, click Create button. Another screen shown up to tell you the RMI system has been created. RMIWizard Tutorial Screen Shot Diagram

Since this sample is run on the Win32 system, so the RMI system can be created immediately. Click Yes button. The following screen show that the RMI server has been created successfully. RMIWizard Tutorial Screen Shot Diagram

Now launch another MS-Dos console, go to that directory and type:

>../.../client
The client is a batch file. You will see the following screen: RMIWizard Tutorial Screen Shot Diagram

The RMI system has been created successfully. The generated files are listed as follows: RMIWizard Tutorial Screen Shot Diagram

All the generated files are preceded with "Remote_". They are easy for you to recognize and easy for you to delete or remove or regenerate.

If you follow the above steps to make your first RMI system workable, you can use plain text editor to open the generated files and study the code.

If you want to try another local class and want to make it available remotely, please compile that class first, then load that class file. For non-Win32 system or more info, please read help file.

If you have not updated RMI knowledge, this generated code is a good way for you to study and get hands-on experience.