Local Applet and Remote Applet

Local Applets

We can create our own applet by own design and embed them into web pages. Local applets are developed in a single system and it is stored in a local system. The web page will search the local system directories, find the local applet and execute it. Execution of local applets doesn't required any internet connection.

Specifying a Local Applet

<applet codebase="path" code="NewApplet.class" width=120 height=120 >
In the above listing , the codebase attribute specifies a path name on your system for the local applet, whereas the code attribute specifies the name of the byte-code file that contains the applet's code. The path specified in the codebase attribute is relative to the folder containing the HTML document that references the applet.

Remote Applets

An remote applet is that which is developed by someone else and stored on a remote computer connected to the internet.

Specifying a Remote Applet

height=120 >
The only difference between Local Applet and Remote Applet is the value of the codebase attribute. In the first case, codebase specifies a local folder, and in the second case, it specifies the URL at which the applet is located.

Share this article on