Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

About clsid and more in object tag for deployment

843807Jun 27 2008 — edited Jun 30 2008
I've found it a bit hard to get up-to-date information about the best-practice for writing applet/object/embed tags in html when deploying java applets. Anyway, I found this.
<!--[if !IE]> Firefox and others will use outer object -->
<object classid="java:com.myCompany.MyApplet.class"
        type="application/x-java-applet"
        archive="../MyApplet.jar"
        width="400" height="600">
    <param name="mayscript" value="true" />
    <param name="someParameter" value="someValue" />
    <!-- Konqueror browser needs the following param -->
    <param name="archive" value="../MyApplet.jar" />
<!--<![endif]-->
    <!-- MSIE (Microsoft Internet Explorer) will use inner object -->
    <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"
            codebase="http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab"
            width="400" height="600" >
    <param name="code" value="com.myCompany.MyApplet" />
    <param name="archive" value="../MyApplet.jar" />
    <param name="mayscript" value="true" />
    <param name="someParameter" value="someValue" />
    <strong>
        Some error message...<br />
        <a href="http://java.sun.com/products/plugin/downloads/index.html">Download!</a>
    </strong>
    </object>
<!--[if !IE]> close outer object -->
</object>
<!--<![endif]-->
This code works in Firefox 2/3 and IE7 (on Vista). Would you experts here say this is an acceptable way of doing it, or do you have a better way to recommend?

But there is one thing that was really hard to find googling, and that is what should the clsid ("clsid:8AD9C840-044E-11D1-B3E9-00805F499D93") and codebase ("http://java.sun.com/update/1.5.0/jinstall-1_5_0-windows-i586.cab") be if I want the applet to run in the latest Java version? Or at least 1.6.0 instead of 1.5.0 since I compile the applet using jdk1.6.0_06.

And wouldn't www.java.com be a more user-friendly download link instead of http://java.sun.com/products/plugin/downloads/index.html? On this site it says "The above default release, 1.4, is the latest release of Java Plug-in." and links to http://java.sun.com/j2se/1.4.2/download.html, which in term says "J2SE 1.4.2 is in its Java Technology End of Life (EOL) transition period." Why couldn't Sun keep their web sites a bit more up-to-date?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 28 2008
Added on Jun 27 2008
2 comments
137 views