After upgrading the EnvInject plugin from version 1.17 to 1.30, Jenkins jobs stopped using the JDK configured for the job and would instead use the JDK referred to by the JAVA_HOME environment variable. For example, a test job that was configured for JDK 1.5 would run with JDK 1.6.0_30, as shown by the following console output:
Apache Maven 2.2.1 (r801777; 2009-08-06 12:16:01-0700)
Java version: 1.6.0_30
Java home: /XXXXX/hotspot1.6.0_30/jre
The jobs are "free-style software projects" which use Maven in some of the build steps.
Downgrading the plugin to the previously installed 1.17 version fixed this problem, but I do not know exactly what version introduced the issue.