How to use JADE within Applets

Author: Claudiu Anghel (

Date: April 22, 2003

Java platform: Sun JDK 1.3.1_01 Windows

JADE version 3.0b1


The aim of this tutorial is to show how to use JADE within applets. Since JADE is written in Java, it is quite easy to use the JADE technology in applets. The use of applets may be helpful in situations in which the client of a JADE based application doesn't want to install anything on his machine but wants to access the application directly via the web browser. To be more specific, an applet integrating JADE agents will offer the possibility for such agents to live on the client's machine without them needing more than a Java enabled web browser to be installed on that machine.


This tutorial assumes the following:


There are mainly only two things you must do in order to get an applet, that uses JADE, working: create a jar archive containing all your classes and sign this archive using a certificate. The certificate can be obtained from a well-known Certificate Autority (CA) like VeriSign or Thawte, but during the development, this certificate can be generated easily, as we will see during this tutorial. The steps that have to be followed are:

The example associated to this tutorial shows how to use JADE in applets. The tested features are: creating an agent container within the applet, installing the HTTP MTP on the applet container, creating an agent within the applet container, exchange of messages between an applet JADE agent and another JADE agent living on another container, and migration of an agent to an applet container and from an applet container to another container.

JADE Applet Example description

The example has two main parts: the server part and the client applet part.
The server part performs the following:

The client applet part performs the following:

The example contains the following folder structure:

How to run the JADE Applet Example

The following steps should be performed:

You can also perform the following:

Known Issues