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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Cannot Reproduce
    • Affects Version/s: 7u7
    • Fix Version/s: 9
    • Component/s: deploy
    • Labels:
    • Environment:

      Tested on Windows 7 x64 and Linux x64, Java 1.7.0_07, JavaFX 2.2.1

      Description

      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>

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved:
                Imported: