This discussion is archived
4 Replies Latest reply: Jun 5, 2011 5:52 PM by EJP RSS

Applets on the Mac

user10101058 Newbie
Currently Being Moderated
I am getting royally confused as to how to deploy applets in a way that will work on the Mac platform. I already know that the plugin2 mechanism as described in the current Java Tutorial under "Developing an Applet", i.e.,
http://download.oracle.com/javase/tutorial/deployment/applet/deployingApplet.html
won't work. But what exactly is the "old" mechanism? Is it what is described under "Deploying With the Applet Tag" (still in the current tutorial), i.e.,
http://download.oracle.com/javase/tutorial/deployment/applet/html.html
or do I need to go all the way back to pre-1.6 times, e.g., to this description:
http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/contents.html

The discussion of the applet tag in these two documents is especially confusing. The current tutorial implies that it it still perfectly valid but the Java 1.5 plugin guide referenced above say: "The HTML specification states that the applet tag is deprecated, and that you should use the object tag instead. However, the specification is vague about how browsers should implement the object tag to support Java applets, and browser support is currently inconsistent. Sun therefore recommends that you continue to use the applet tag as a consistent way to deploy Java applets across browsers on all platforms." So, which is it: can we depend on the applet tag or not?

Thanks a lot for any enlightenment.
  • 1. Re: Applets on the Mac
    EJP Guru
    Currently Being Moderated
    I did some experiments on that last year. Basically the APPLET tag works on every browser on every platform with the exception of IE, where you have to use the OBJECT tag. It seems to me that the APPLET tag will be supported forever, with that exception, regardless of what it may say in the HTML standard. Provided you don't use HTML strict mode. I do, everywhere except in my one page that contains an applet tag.
  • 2. Re: Applets on the Mac
    user10101058 Newbie
    Currently Being Moderated
    Thanks for the answer. I just coded a test applet without JNLP and using the applet tag and, glory be, it works in IE8! Presumably it works in IE9, too. As for IE7/6/5 etc, well, that's just too bad; it's high time to desupport these antiquities.

    OTOH a friendly tester told me that the plugin2 version of the applet works even on the Mac but only with the Chrome browser. I am baffled by this since I don't see what would make Chrome special (AFAIK it doesn't bundle its own Java) and would like it double-checked but, not having a Mac myself, I cannot investigate. Can anyone confirm of deny?
  • 3. Re: Applets on the Mac
    user10101058 Newbie
    Currently Being Moderated
    Backtracking a bit, it seems clear from the docs:
    http://download.oracle.com/javase/1.5.0/docs/guide/plugin/developer_guide/contents.html
    http://download.oracle.com/javase/6/docs/technotes/guides/plugin/developer_guide/contents.html
    that the applet/object/embed tag issue is orthogonal to the new vs. classic plug-in issue. So my question still stands: if you want to use the classic plug-in, exactly what must you do/not do? I can't find any clear write-up on that anywhere.
  • 4. Re: Applets on the Mac
    EJP Guru
    Currently Being Moderated
    That's what I answered. I also included JNLP in those tests but found, like you, that contrary to its claims it doesn't work on all browsers and platforms. What I said above does, at least for all the platforms I tested. That wasn't exhaustive, as I didn't test all operating system or browser versions, but it did include Windows and Mac, and IE6/7/8, Firefox, Opera, Safari, Chrome, and I think others.

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points