Search code examples
javajapplet

Applet can be loaded in IE and Firefox,but failed in Safari5.1


I use Safari5.1 to load an signed applet on Windows desktop, but it failed and seems the JAVA plug-in NOT started. The html code like below, do i need to add other parameter for Safari 5.1 ? And is there any other method to load applet in Safari? thanks. system is Windows, browser version is Safari 5.1

<!--[if !IE]> Firefox and others will use outer object -->

<object classid="java:com.keithley.SCPI.SCPIApplet.class" type="application/x-java-applet;version=1.6" archive="../jar/SCPI.jar" height="480" width="640">
<param name = "scriptable"   value = "true">
<!-- Konqueror browser needs the following param -->
<param name = "ARCHIVE"    value = "../jar/SCPI.jar">
     <!-- (Microsoft Internet Explorer) will use inner object -->
     <object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="http://java.sun.com/update/1.6.0/jinstall-6u35-windows-i586.cab#Version=6,0,0,10"
             height="480" width="640" >
             <param name = "CODE"       value = "com.keithley.SCPI.SCPIApplet.class">
             <param name = "ARCHIVE"    value = "../jar/SCPI.jar">
             <param name = "type"       value = "application/x-java-applet;version=1.6">
             <param name = "scriptable" value = "false">
      </object>
       <!--[if !IE]> close outer object -->
</object>

Solution

  • Try with <object> and <embed> instead of <object> inside another <object>:

    <object classid = "clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"  
            codebase="http://java.sun.com/update/1.6.0/jinstall-6u35-windows-i586.cab#Version=6,0,0,10" 
            width="640" height="480" id="yourAppletId">
        <param name = "code" value = "com.keithley.SCPI.SCPIApplet.class">
        <param name = "archive" value = "../jar/SCPI.jar">
        <param name = "mayscript" value = "true">
        <param name = "scriptable" value = "true">
        <param name = "type" value = "application/x-java-applet;version=1.6">
        <comment>
            <embed type = "application/x-java-applet;version=1.6"
                   code = "com.keithley.SCPI.SCPIApplet.class" 
                   archive = "../jar/SCPI.jar"
                   scriptable = "true"
                   width = "640" height = "480"
                   name = "yourAppletId"
                   mayscript = "true"
                   scriptable = "true">
            </embed>
        </comment>
    </object>
    

    Besides if you want to check if the java plugin start, you can go to control panel > Java, select the Advanced tab an on Java console option select Show console radio button.

    Hope this helps,