JV_MI
JV_MI

Reputation: 31

java applet not visible in chrome but working in FF

i have an applet that was work fine in java version under 7u45 and in firefox ,but when i updated java to the latest version my applet loads but it does not appear except when I try to inspect the item with chrome, it will display. Here are the console log:

févr. 02, 2014 11:56:46 AM mt.common.util.applet.myapplet init
Infos: isLoggable(ALL) : true
févr. 02, 2014 11:56:46 AM mt.common.util.applet.myapplet init
Infos: Loading of child applet successfull
févr. 02, 2014 11:56:46 AM mt.common.util.applet.myapplet init
Infos: OK : the child applet is an instance of myapplet 
févr. 02, 2014 11:56:46 AM org.modula.applet.document.myapplet1 init
Infos: init() myapplet1 2.0
févr. 02, 2014 11:56:48 AM org.modula.applet.document.myapplet1 init
Infos: End init()
testmepl6
févr. 02, 2014 11:56:48 AM mt.common.util.applet.applet start
Infos: Start...

i call myapplet like this:

   var attributes = {id:"appletInstance",
          name:"appletInstance",
          code:"mt.common.util.applet.myapplet",
          codebase:"<%=urlCodeBase %>",
          width:150, height:30};
var parameters = {jnlp_href: "<%=urlJnlp %>"};
<div style="text-align: center; float:right;">
    <%= bordPanelState.getHTMLTop() %>
    <div id="divPopupActions" style="text-align: center; padding: 2px 5px 2px 5px;">

<%if(vUrlFile.size()>0){ %>

        <!---------------------------------------->
        <!---------------- Applet ---------------->
        <!----------------------------------------> 
        <!--    <script src="http://www.java.com/js/deployJava.js"      type="text/javascript"></script> -->
        <script src="<%= rootPath %>include/js/java/deployJava.js"></script>
        <script type="text/javascript">

            deployJava.runApplet(attributes, parameters, '1.6'); 

        </script>

<%} %>

    </div>
    <%= bordPanelState.getHTMLBottom() %>
</div>

this is my jnlp file

<?xml version="1.0" encoding="UTF-8"?>
<jnlp href="appletContainer.jnlp">
    <information>
        <title>applet Container</title>
        <vendor>MT</vendor>
    </information>
    <resources>
        <!-- Application Resources -->
        <j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se" download="eager"/>
        <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se" download="eager"/>
        <jar href=myapplet.jar" download="eager"/>
    </resources>
    <applet-desc 
         name="Applet Container"
         main-class="mt.common.util.applet.AppletContainer"
         width="200"
         height="300">
     </applet-desc>
     <update check="always"/>
</jnlp>

Upvotes: 0

Views: 547

Answers (2)

Lonzak
Lonzak

Reputation: 9816

As JaNeLa correctly reports, there are several issues with your jnlp file. I fixed the problems, try the following:

<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="6.0+" href="appletContainer.jnlp">
    <information>
        <title>applet Container</title>
        <vendor>MT</vendor>
        <offline-allowed />
    </information>
    <update check="always" policy="always"/>

    <resources>
        <j2se version="1.7+" href="http://java.sun.com/products/autodl/j2se"/>
        <j2se version="1.6+" href="http://java.sun.com/products/autodl/j2se"/>
        <jar href="myapplet.jar" download="eager"/>
    </resources>

    <applet-desc 
        main-class="mt.common.util.applet.AppletContainer"
        name="Applet Container"
        width="200"
        height="300"/>
</jnlp>

Interestingly JaNeLa also reports an error about those two j2se tags which is perfectly valid to do. Maybe Andrew Thompson can shed some light on this behaviour, which seem like a bug to me...

Upvotes: 0

Runner Dd
Runner Dd

Reputation: 41

I think there might be an error in your applet base code

Upvotes: 1

Related Questions