Applets vs Applications

Submitted by: 
Language: 

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!


Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.