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

2.2 SwingInterop sample build file looks for JavaFX 2.1

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • 7u6
    • None
    • javafx
    • None

      From the SwingInterop build file in the 2.2b16 examples directory:

          <!-- try and find JavaFX SDK -->
          <target name="find-javafx" unless="javafx.sdk">
              <property environment="env" />
              <condition property="javafx.sdk"
                          value="${env.ProgramFiles(x86)}/Oracle/JavaFX 2.1 SDK/"
                          else="${env.ProgramFiles}/Oracle/JavaFX 2.1 SDK/">
                  <and>
                      <contains string="${os.arch}" substring="x86"/>
                      <available file="${env.ProgramFiles(x86)}/Oracle/JavaFX 2.1 SDK/rt/lib/jfxrt.jar"/>
                  </and>
              </condition>
          </target>
          
          <!-- check if jfxrt.jar exists in specified JavaFX SDK directory -->
          <target name="check-javafx">
              <available file="${javafx.sdk}/rt/lib/jfxrt.jar" property="found-javafx"/>
          </target>

          <target name="javafx-missing" unless="found-javafx">
              <fail>.
                  Ant could not find JavaFX 2.1 SDK. Please set [javafx.sdk] on command line:
                  eg. ant -Djavafx.sdk="C:\Program Files\Oracle\JavaFX 2.1 SDK"
                   or ant -Djavafx.sdk="C:\Program Files (x86)\Oracle\JavaFX 2.1 SDK"
              </fail>
          </target>

      Perhaps the logic should be, look for JavaFX in the Oracle directory for JDK6 on windows, but otherwise look for JavaFX relative to the jdk location.

            dmasada Debra Masada (Inactive)
            josmithjfx John Smith (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: