FAQ
General Questions
What is the difference between Java and JavaScript?
Although both are programming languages commonly seen on the Web, they are two very different things.
Java is a language like C that needs to be compiled before use, then referred to with <APPLET> tags in an HTML file.
The browser downloads the applet as it would an image, interprets the .class files, then displays the results.
JavaScript is a language that can be written directly into an HTML file, between <SCRIPT> tags.
The browser interprets the JavaScript along with the HTML, and displays the results.
In general JavaScript is more integrated with an HTML page. For example it can be used to detect information about a user's browser then adjust the HTML that is displayed.
While Java tends to be more of an independent mini-application that sits on a web page, similar to a Flash movie.
Also, while JavaScript tends to be easier to learn and use, it can't be used to create standalone desktop applications the way Java can.
What is the difference between an applet and an application?
A Java application is made up of a main() method declared as public static void that accepts a string array argument, along with any other classes that main() calls. It lives in the environment that the host OS provides.
A Java applet is made up of at least one public class that has to be subclassed from java.awt.Applet. The applet is confined to living in the user's Web browser, and the browser's security rules, (or Sun's appletviewer, which has fewer restrictions).
What are the security limitations of a Java applet in a Web browser?
Java was developed with the intent to prevent applets from inspecting or changing files on the client file system, or from using network connections to circumvent file protections or people's expectations of privacy.
What this means for developers is that your applet will only be able to read to and write from a file on the server that the applet was served from. Using Sun's appletviewer, however, you can specify which files on your PC may or may not be read/written by an applet or application. This may be fine when you are developing applets for you or your companies use, but it won't do much for you if you are developing applets for the Internet.
The JDK 1.1 provides the ability to load and authenticate signed classes. This enables browsers to run trusted applets in a trusted environment, but as of yet most browsers do not support the JDK 1.1.
I downloaded an applet from your site, and I get a "____ class not found" error message, and the applet won't run. Why?
The applet tag may have the attribute codebase=... which is pointing to a specific directory.
You need to make sure that you have placed the applet class files within the specified directory, and that you are pointing to them correctly from the applet tag. Also, make sure that you have all the required class files, as many applets use more than one.
When I try to download a class file from the Java Boutique, and also other places, Netscape saves the file with an .exe extension. What can I do to prevent that from happening?
This is caused by a bug in Netscape, and you can prevent it by holding down the shift key when you click to download the class file. Then you can save it as it with the proper file extension.
What can I do to prevent someone from using an applet which resides on my own server--just pointing to it with a codebase paramater?
Unless you are the author of the applet, and wish to invest theft-prevention code into your applet, there's not much you can do. You can use the search engines to look for occurances of the applet, and check to see if they're using your own applet. Also, Web server log files will show you how often the class file is being requested, and you can easily figure out if the hits are coming from your own use of the applet or another person's page.
Read the article I Said a Sip, Not the Whole Cup!
Are the applets on the Java Boutique copyrighted, and can you permit me do do what I want with the applet?
Every applet on the Java Boutique is still the property of the respective authors of that applet. They retain the copyright, and you should contact them for further information on that copyright. Most of the applets hosted on the Java Boutique are available for you to use on your site; if the applet must be purchased, it is indicated on that applet's demo page.
More Specific Questions
Is there a good way to animate a flag?
Check out the Wave applet.
|