0 Replies Latest reply: Oct 3, 2013 4:20 PM by WesStupar RSS

    Why won't my JNLP work?

    WesStupar

      I have a test plugin created using Net Beans. The jar runs fine on the command line using java -jar. It outputs some text and creates a dialog.

      Here is a link to a screenshot of the output of the jar:

      https://www.amazon.com/clouddrive/share?s=XAjjPu--ShIp5-4iVhGEXw

       

      I am trying to get it to run using JNLP with the following code:

      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="1.0+" codebase="http://localhost" href="TestJNLP.jnlp">
        <information>
          <title>Test of basic plugin</title>
          <vendor>Computer Applications</vendor>
        </information>
        <resources>
          <java href="http://java.sun.com/products/autodl/j2se" version="1.6+"/>
          <jar href="TestPlugin.jar" main="true" />
          <jar href="org-openide-awt.jar" />
        </resources>
        <applet-desc name="Basic Plugin"
          main-class="testplugin.TestPlugin"
          width="200"
          height="60"/>
      </jnlp>                                

      and the html:

      <!DOCTYPE html>

      <html>

          <head>

              <meta http-equiv="Content-Type" content="text/html; charset=utf-8">

              <meta name="viewport" content="width=640">

              <Title> Compaps Plugin </Title>

          </head>

          <body>

              Hello to all...

          <script src="http://www.java.com/js/deployJava.js"></script>

          <script>

              var attributes = {

                code:'testplugin.TestPlugin',  width:300, height:50 } ;

              var parameters = {

                          jnlp_href: 'TestJNLP.jnlp', permissions:'sandbox',

                          codebase_lookup:'TestPlugin.jar' } ;

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

          </script>

          </body>

      </html>

      Firefox gives me "java.lang.reflect.InvocationTargetException".

      Here is a screenshot of the browser output:

      https://www.amazon.com/clouddrive/share?s=IskO3J4qThggo2QmyFa7Go

       

      Where am I going wrong?

      Wes