Simple RMI Framework User Manual: A Comprehensive Guide
VerifiedAdded on 2025/06/23
|6
|627
|425
AI Summary
Desklib provides solved assignments and past papers to help students understand the Simple RMI framework.

Simple RMI Framework User Manual
1
1
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

Table of Contents
1- Introduction...................................................................................................................................3
2- Building a project with Simple RMI framework............................................................................3
3- Running examples.........................................................................................................................3
2
1- Introduction...................................................................................................................................3
2- Building a project with Simple RMI framework............................................................................3
3- Running examples.........................................................................................................................3
2

1- Introduction
The simple RMI framework allows remote method invocation but with lightweight settings compared
to standard java RMI. In this document, we present our framework and a simple client-server
application using it.
The folders are organized as follows:
The root folder contains four elements:
- This user manual
- A Netbeans project named contract which defines classes of our framework that will be
shared by all parties wishing to use it.
- A Netbeans project folder compute-client which uses our framework to implements a simple
GUI client
- A Netbeans project folder compute-server which implements multithreaded TCP server for
with our framework.
In the following lines, you will see how to use our framework in a new project, and how to set up the
client and server application to run them.
2- Building a project with Simple RMI framework
If you decide to use our Simple RMI framework in your project, there are few steps to follow in order
to get your projects compiled and work run successfully.
a) Add the contract.jar to your client and server classpath during compile and runtime: That file
contains contract.Task and contract.CSMessage classes that provide communication between
both clients and server. Contract.jar is located in the dist subfolder of the contract folder.
b) In your client project, creates a package contract under which you will add all your Task
implementations. Note that all classes in that contract package have to implement the
contract. Task interface provided by the contract.jar archive.
3- Running examples
The examples project installation is quite obvious;
a) Launching client
The compute-client folder is a Netbeans project folder, and therefore, the project has been built and
packaged as .jar file with Netbeans. The executable jar file of the client lies in the dist folder; to run it,
you simply need to run it in command line in the folder with the following command: java -jar
compute-client.jar. Then it will show the main GUI of the client application.
Note that on Windows OS, you can simply double-click on the compute-client.jar to execute it.
3
The simple RMI framework allows remote method invocation but with lightweight settings compared
to standard java RMI. In this document, we present our framework and a simple client-server
application using it.
The folders are organized as follows:
The root folder contains four elements:
- This user manual
- A Netbeans project named contract which defines classes of our framework that will be
shared by all parties wishing to use it.
- A Netbeans project folder compute-client which uses our framework to implements a simple
GUI client
- A Netbeans project folder compute-server which implements multithreaded TCP server for
with our framework.
In the following lines, you will see how to use our framework in a new project, and how to set up the
client and server application to run them.
2- Building a project with Simple RMI framework
If you decide to use our Simple RMI framework in your project, there are few steps to follow in order
to get your projects compiled and work run successfully.
a) Add the contract.jar to your client and server classpath during compile and runtime: That file
contains contract.Task and contract.CSMessage classes that provide communication between
both clients and server. Contract.jar is located in the dist subfolder of the contract folder.
b) In your client project, creates a package contract under which you will add all your Task
implementations. Note that all classes in that contract package have to implement the
contract. Task interface provided by the contract.jar archive.
3- Running examples
The examples project installation is quite obvious;
a) Launching client
The compute-client folder is a Netbeans project folder, and therefore, the project has been built and
packaged as .jar file with Netbeans. The executable jar file of the client lies in the dist folder; to run it,
you simply need to run it in command line in the folder with the following command: java -jar
compute-client.jar. Then it will show the main GUI of the client application.
Note that on Windows OS, you can simply double-click on the compute-client.jar to execute it.
3
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide

b) Launching the server
The server is also a Netbeans project and should be run from the command line. However, the
compute server have to know the repository from which it will find compute-task uploaded by clients.
That is why in the compute-server, you will see a “repository” directory in which compute task
will be copied. The repository folder is empty by default.
To run the server navigates to dist folder in the command line, then type the following command
java -cp compute-server.jar;../repository server.ComputeServer to indicates that you are adding
the repository folder to your classpath.
c) Trying to invoke remote method
Once the server is up and running, you can set the client to run method remotely; to do that, you just
need to type the server name and server port on the client GUI and then click on set button.
4
The server is also a Netbeans project and should be run from the command line. However, the
compute server have to know the repository from which it will find compute-task uploaded by clients.
That is why in the compute-server, you will see a “repository” directory in which compute task
will be copied. The repository folder is empty by default.
To run the server navigates to dist folder in the command line, then type the following command
java -cp compute-server.jar;../repository server.ComputeServer to indicates that you are adding
the repository folder to your classpath.
c) Trying to invoke remote method
Once the server is up and running, you can set the client to run method remotely; to do that, you just
need to type the server name and server port on the client GUI and then click on set button.
4
Paraphrase This Document
Need a fresh take? Get an instant paraphrase of this document with our AI Paraphraser

You will get an error if you don’t specify either the server name or the server port, and you cannot
invoke any remote method if server settings are not yet set.
Once the server settings set, you can try to invoke a remote method. But make sure that all the
compute task classes are uploaded to the server repository before.
Browse to the build/classes folder in the compute-client folder, then copy the contract subfolder to the
server repository
For example, calculate prime numbers.
5
invoke any remote method if server settings are not yet set.
Once the server settings set, you can try to invoke a remote method. But make sure that all the
compute task classes are uploaded to the server repository before.
Browse to the build/classes folder in the compute-client folder, then copy the contract subfolder to the
server repository
For example, calculate prime numbers.
5

As you can see, you can invoke methods remotely on the server, but the calculatePrime method has
failed, because we forgot to upload the compute task to the server
Now, as the calculatePrime task is uploaded, the method works well without any application reboot
6
failed, because we forgot to upload the compute task to the server
Now, as the calculatePrime task is uploaded, the method works well without any application reboot
6
⊘ This is a preview!⊘
Do you want full access?
Subscribe today to unlock all pages.

Trusted by 1+ million students worldwide
1 out of 6

Your All-in-One AI-Powered Toolkit for Academic Success.
+13062052269
info@desklib.com
Available 24*7 on WhatsApp / Email
Unlock your academic potential
Copyright © 2020–2025 A2Z Services. All Rights Reserved. Developed and managed by ZUCOL.