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

Updated env variables not picked up by FX build if gradle daemon is running

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: External
    • Icon: P4 P4
    • None
    • 9, 10
    • javafx

      Setting a new environment variable or updating an existing env variable will not be picked up by the FX build if the gradle daemon is running.

      To reproduce this, run the following command without ANT_HOME set and without ant in your PATH:

      gradle apps

      It will fail trying to build the apps because ant is not found. Now try to fix it:

      export ANT_HOME=/path/to/ant
      export PATH=${PATH}:$ANT_HOME/bin
      gradle apps

      It will not pick up the new env setting and the build will still fail.

      gradle launches a daemon by default. It will reuse this daemon for subsequent builds in the same directory as long as the build.gradle file and the JDK version uses to run the build is the same.

      When building using JDK 9 (which is the minimum required version for jfx-dev), the environment variable settings that were in effect at the time the gradle daemon was launched are used for all subsequent builds that run using that daemon.

      Workround: stop the gradle daemon with 'gradle --stop' whenever you change env settings (or don't use the gradle daemon in the first place).

            kcr Kevin Rushforth
            kcr Kevin Rushforth
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: