Is the EncryptionApplication
really an applet? To be an applet it must extend Applet
or JApplet
.
If it is not an applet, it cannot be embedded in HTML.
If it is an applet, the JNLP must declare it as such, so:
<application-desc
name="Encryption Software"
main-class="EncryptApplication"
width="500"
height="300">
</application-desc>
Should be:
<applet-desc
name="Encryption Software"
main-class="EncryptApplication"
width="500"
height="300">
</applet-desc>
Tips
- Be sure to check the JNLP using JaNeLA.
- Avoid applets like you might avoid the plague. They were always a complete PITA and with recent security updates, have only become more so. See Why CS teachers should stop teaching Java applets for my take on the matter.
- It is possible to launch an application (e.g. a
JFrame
based app.) from a link using Java Web Start. They will be subject to the same (very strict) security requirements of applets, but have none of the applet specific problems (see link in previous point for details). - As mentioned by @ElliottFrisch, it is best to include a valid value for the
code
attribute. There are circumstances in which it can be left out, but I won't get into that right now..