Just out of curiosity, between <applet>
vs <object>
for a Java applet, which one should I use? I know that <applet>
is deprecated, however Sun still recommends the use of <applet>
.
Is there any drawback between the two tags? Because when I use <object>
for Mac in Safari, it causes a problem saying that the page can't load, even though the page loaded properly, and when I check the activity window it said that the class was not found/cancelled. For example:
Use applet
if you have found that it works more often. The object
element was introduced as a theoretical unification that would be a catch-all for any embedding of external data. It never worked well, and modern HTML development has effectively abandoned the unification idea. HTML5 introduces audio
and video
, for example and keeps img
(logical unification would surely deprecate img
, because an image can be embedded with object
).
Use deployJava.js
as mentioned in the applet info. page..
..To avoid browser compatibility issues, the Deployment Toolkit script provides JavaScript functions that automatically generate the HTML required to deploy RIAs. Developers should invoke these functions to deploy their solutions in a consistent fashion across various browsers.
Then you don't have worry about whether the script writes an applet
, object
or embed
element.
As an aside. Copy/pasting the text from the Activity window would be a lot more useful than a screen-shot. Now I look (squint) at it, it seems the only two lines of output that are in any way relevant are:
The css/none
is not a class or a Jar, and neither of them exist on the server. So that applet has problems beyond the HTML elements used to deploy it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With