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:
Click the Start button, you will see the following screen.
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.
Now, click Create button. Another screen shown up to tell you
the RMI system has been created.
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.
Now launch another MS-Dos console, go to that directory and type:
>../.../clientThe client is a batch file. You will see the following screen:
The RMI system has been created successfully. The generated files are listed
as follows:
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.