Java Myths- Fact versus Fiction

Inside Java :
Java myths - fact versus fiction

There are so many myths about Java. This month, I'll look at some of the more persistent ones, and try to dispel any doubt.

Fiction :
Applets can read your hard-drive, and delete files

Fact :
Any attempt by an applet to access local files will throw a SecurityException. If uncaught, the applet will crash, but no file access will occur.

The only exception to this rule is for digitally signed applets, which may be granted additional privileges. Your browser will display a dialog box, asking you if you want to accept the identity of the applet author. Choose no if unsure, and you'll always be safe.



Fiction :
Java requires a web browser. Java only runs in a web browser.

Fact :
Java code comes in many forms. The most familiar to users is the applet, which runs inside a web browser. However, this is only the tip of the iceberg.

Java applications can be run just like normal programs. By installing a JVM from vendors like Sun or Microsoft, you gain the ability to run Java programs. It's just like normal programs, such as Microsoft Word.

Java servlets run inside a web server. Servlets are a replacement for CGI scripts, and Active Server Pages (ASP). Servlets are actually really fast, and can be more efficient than CGI scripts.



Fiction :
Java is a hundred times slower than C, so you shouldn't ever use it for "serious" programming.

Fact :