-
Bug
-
Resolution: Unresolved
-
Minor
-
None
If a freestyle job has 'system' jdk set, behaviour changes depending on how many installers are present.
To reproduce:
- Ensure only one jdk installer is configured
- Create freestyle job with selected jdk as 'system'
- Ensure job runs on worker node (not controller)
- Add 'execute windows batch command' step to job, which runs 'java -version'
- Run job
- Add second configured jdk installer to global tools configuration
- Re-run job
Observed results:
- First run of job succeeds and displays jdk information
- Second run fails, which java executable not found in path
Minor update:
When only one installer is configured, the jdk selector doesn't appear in freestyle job configuration page. But it appears that the job uses the configured installer and sets the relevant environment variables, regardless of what build steps are defined
When more than one installer is configured, the jdk selector is available and defaults to 'system'. However, it also affects existing jobs as they no longer use the first configured installer. When the configuration page is brought up for them, they now also show 'system' as the configured jdk for the job and no JAVA_HOME or PATH information is set for the job.