Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8088302

JNLP parameters are not passed to Swing main class when using DT

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 9
    • 7u7
    • deploy
    • Tested on Windows 7 x64 and Linux x64, Java 1.7.0_07, JavaFX 2.2.1

      When using the DT for a Swing application (with embedded JavaFX content) the arguments are not passed to the main method of the application.

      Sample JNLP file:

      <?xml version="1.0" encoding="UTF-8"?>
      <jnlp spec="6.0+" codebase="http:/xxxx/" href="xxx.jnlp">
              <information>
                      <title>XX</title>
                      <vendor>XXX</vendor>
              </information>
              <security>
                      <all-permissions />
              </security>
              <update check="always" policy="always" />
              <resources>
                      <java version="1.7+" java-vm-args="-Xmx700m" />
                      <jar href="http://xxxx/xx.jar" main="true" />
              </resources>
              <application-desc main-class="xx.xx.XX">
                      <argument>-productive</argument>
                      <argument>-dccphost</argument>
                      <argument>ccc.org</argument>
              </application-desc>
      </jnlp>

      HTML file with DT:

      <script src="http://java.com/js/dtjava.js"></script>
      <script>
              function launchApplication(jnlpfile) {
              dtjava.launch(
                  { url : jnlpfile },
                  {
                    javafx : '2.2+',
                    toolkit: 'swing'
                  },
                  {}
              );
              return false;
              }
              </script>

      <a href='xxx.jnlp'
              onclick="return launchApplication('xxx.jnlp');">Starten</a>
      </p>

            herrick Andy Herrick (Inactive)
            duke J. Duke
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: