Search code examples
appletxulxulrunner

Java applet in XUL


I have an html file that loads a java applet. It works perfectly if opened directly in Mozilla, but, when i try to load it in a XUL iframe nothing happens.

Anybody can tell me what may be the problem?

Thanks in advance,

PS: The XUL application i'm testing this in is installed in mozilla user chrome and the html file (applet.html) content is just this:

 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
        "http://www.w3.org/TR/html4/frameset.dtd";>
      <html>
        <head>
        <meta http-equiv="Expires" content="0">
        <title>Protein Viewer (Webmol)</title>
        </head>
        <body id="PDBViewerBody" bgcolor="#ffffff" leftmargin="0"
        topmargin="0" marginwidth="0" marginheight="0">

        <applet code="proteinViewer.class"
        codebase="proteinViewer.jar";
        width="700" height="500">

        <param name="PROTEIN" value="example">
        <param name="PATH" value="">
        <param name="URL" value="http://decsai.ugr.es/~jrgonzalez/test-webmol/";>
        <param name="EXT" value="pdb">
        <param name="PDB_STRING" value="">
        </applet>
       </body>
    </html>

and here is xul

<?xml version="1.0"?>

<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>

<window id="main" title="My App" width="315" height="370"
  xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">

  <iframe id="abc" src="chrome://myapp/content/applet.html" flex="1" />

</window>

I am working on xulrunner 1.9.2 and Mac OS lion.


Solution

  • I found that for firefox >= 4 xulrunner >=2 is needed to work with java applets. So, I used xulrunner 2 and now java applets is running perfectly as it needed to be.