Skip to main content

Applets vs Applications


Introduction:
Welcome! This page will talk about the difference between Java Applets and Java Applications.

What is the difference between Java Applets and Java Applications?
Both Java Applets and Java Applications are ran from the same Java source code, the only different is how it is ran. A Java Application must have the resource files stored locally (in other words, it must be ran directly on a device), it must contain a "main()" method and is compiled by using the "javac" (Java Compiler) on the development system, this is done through Command Prompt (CMD) manually or within the IDE used to develop the application. Java Applets on the other hand, do not require a "main()" method to initiate the process, they must be contained within a website document (HTML, PHP, etc.), they are stored on the server of a website or FTP server (or other online source) and they are also compiled using the Java Compiler but they are unable to run standalone.

When are they used?
Java Applications are used for anything Java program which is downloaded and ran locally, whereas Java Applets are used mainly for online purposes, such as online 3D viewers, or online 3D (embedded) games (Minecraft Classic, for example).

Important!
It has been clearly noted within the Java updates (and on Applet confirmation screens) that there is a massive security problem with allows online applets to be ran. This is because the applet can be used to infect your computer by accessing your PC through the allowed Java plug-in. Because of this security problem, Oracle (The creators of Java) have stated that they are removing the ability to run Java Applets in the near future.

Finished!

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip to decompress it.

Virus note: All files are scanned once-a-day by SourceCodester.com for viruses, but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:

1. Re-scan downloaded files using your personal virus checker before using it.
2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

Comments

Add new comment

CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.