I think you have picked up on the solution there. Either always use the full path to the desired Java installation, or alter your path so that 'which java' returns the correct path.

Eric

On 9/20/2013 10:01 AM, Farrukh Najmi wrote:
I do not see a Java Version list box in my job config page in UI. I have expanded varios Advanced section in the page but still do not see Java Version list. I am using Jenkins version 1.531.

The only Java Version available in Jenkins global config is JDK 7.

One odd difference I notice in the logs for a successful build vs. failed build is that the failed build uses java command without fully qualified path while successful build uses fully qualified path to corect jdk.

#From bad build piucking up JDK 6
java -Djava.io.tmpdir=/var/lib/jenkins/tmp -cp 
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.4.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.4.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging
 jenkins.maven3.agent.Maven31Main 
/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven 
/var/cache/jenkins/war/WEB-INF/lib/remoting-2.32.jar 
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.4.jar 
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.4.jar
 46644

#From good build using JDK7
/var/lib/jenkins/tools/hudson.model.JDK/JDK_7/bin/java 
-Djava.io.tmpdir=/var/lib/jenkins/tmp -cp 
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-agent-1.4.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/boot/plexus-classworlds-2.4.2.jar:/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven/conf/logging
 jenkins.maven3.agent.Maven31Main 
/var/lib/jenkins/tools/hudson.tasks.Maven_MavenInstallation/Maven 
/var/cache/jenkins/war/WEB-INF/lib/remoting-2.32.jar 
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven31-interceptor-1.4.jar 
/var/lib/jenkins/plugins/maven-plugin/WEB-INF/lib/maven3-interceptor-commons-1.4.jar
 52130

This seems significant.

Many thanks for your help Ullrich!


On Friday, September 20, 2013 9:43:52 AM UTC-4, Ullrich Hafner wrote:

    What values are in your Java Version list box in you job
    configuration? Which Java Versions are visible in Jenkins global
    configuration? Please use the UI only...

    Am 20.09.2013 um 15:39 schrieb Farrukh Najmi <farruk...@gmail.com
    <javascript:>>:

    Hi Guys,

    Initially all was well and my Jenkins config.xml was configured
    for just JDK7.
    I then added a JDK6 installation to Jenkins config and did a new
    build manually.
    The build failed and on examination I realized my project
    requires JDK7 to build.
    So I edited my Jenkins config to delete the JDK6 installation I
    had added prior to previous build that had failed.
    Now only the JDK7 installation was left in Jenkins config.

    I did another build but now I see that it is still trying to
    build with JDK6 only instead of the JDK6 installation I had added
    from Oracle it is now using the JDK 6 that is part of my Ubuntu
    setup.

    What am I doing wrong and how can I make Jenkins only use the
    JDK7 that I have configured?

    --
    Regards,
    Farrukh Najmi


-- You received this message because you are subscribed to the
    Google Groups "Jenkins Users" group.
    To unsubscribe from this group and stop receiving emails from it,
    send an email to jenkinsci-use...@googlegroups.com <javascript:>.
    For more options, visit https://groups.google.com/groups/opt_out
    <https://groups.google.com/groups/opt_out>.

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to