Issue Type: Bug Bug
Affects Versions: current
Assignee: Kohsuke Kawaguchi
Components: slave-setup
Created: 13/Nov/12 9:53 AM
Description:

When starting jenkins slave, used JAVA_HOME is always the java used to start the jenkins slave. In my case, it was C:\Program Files\Java\jre7.
As it's only a JRE, and not a full JDK, it didn't contain the javac executable.
As a consequence, I got

[ERROR] Unable to locate the Javac Compiler in:
C:\Program Files\Java\jre7\..\lib\tools.jar
Please ensure you are using JDK 1.4 or above and
not a JRE (the com.sun.tools.javac.Main class is required).
In most cases you can change the location of your Java
installation by setting the JAVA_HOME environment variable.

in my maven build log.

Which allowed me to track it to the jenkins-slave.xml file.

As far as i understand, this file is used to configure how the jenkins slave is started, when run using Windows service.

So, in that file, there is this entry :

<!--
if you'd like to run Jenkins with a specific version of Java, specify a full path to java.exe.
The following value assumes that you have java in your PATH.
-->
<executable>C:\Program Files\Java\jre7\bin\java.exe</executable>

I had to change it to one full JDK to have Jenkins able to compile.
Unfortunatly, i'm quite sure Jenkins will only compile using the JDK I choose (<executable>C:\Program Files\Java\jdk1.6.0_24\bin\java.exe</executable>).

Environment: Jenkins runs on a Linux server
Jenkins slave runs on a Windows XP machine
Project: Jenkins
Labels: windows slave
Priority: Major Major
Reporter: Nicolas Delsaux
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to