I just started writing Applets and I had some questions about the HTML applet tags with packages, and class files.
I\'ll start with packages. I\'ve been using Netbeans t
As to the applet
element for a myClass
applet class in the myPackage
package.
1) An applet
element should have spaces between the attributes (I'm not sure if that is part of the W3C recommendation, but it just looks weird).
2) The code
attribute should be the fully qualified name of the class, which means:
3) With no archives and no codebase specified, the JRE would look for the class in the myPackage
sub-directory of the directory from which the HTML is loaded. E.G. if the HTML is called applet.html
and is located at:
The class would need to be located at:
Once you think you have the applet class correct, try fetching it using the address in the browser address bar. If the class is not offered for download, the JRE won't be able to load it either.