You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@apache.org by sebb <se...@gmail.com> on 2011/11/29 20:08:43 UTC

[Jenkins] Unable to locate the default Javac Compiler (ubuntu2)

The HttpComponents build keeps getting an error such as  [1]:

[ERROR] Unable to locate the Javac Compiler in:
  /usr/lib/jvm/java-6-openjdk/jre/../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.

The same build works fine on ubuntu3 and ubuntu5

Is ubuntu2 supposed to be different, or is that an oversight?

At present, the build job uses the (Default) compiler.

I can change that to use a specific version, but I would expect the
(default) to work on all systems that have a Java compiler.

[1] https://builds.apache.org/job/HttpComponents%20AsyncClient/154/console

Re: [Jenkins] Unable to locate the default Javac Compiler (ubuntu2)

Posted by sebb <se...@gmail.com>.
On 29 November 2011 20:13, Niklas Gustavsson <ni...@protocol7.com> wrote:
> On Tue, Nov 29, 2011 at 8:08 PM, sebb <se...@gmail.com> wrote:
>> The HttpComponents build keeps getting an error such as  [1]:
>>
>> [ERROR] Unable to locate the Javac Compiler in:
>>  /usr/lib/jvm/java-6-openjdk/jre/../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.
>>
>> The same build works fine on ubuntu3 and ubuntu5
>>
>> Is ubuntu2 supposed to be different, or is that an oversight?
>>
>> At present, the build job uses the (Default) compiler.
>>
>> I can change that to use a specific version, but I would expect the
>> (default) to work on all systems that have a Java compiler.
>
> There is no such guarantee, you should always tie your build to a
> specific version provided in Jenkins.

So why have the default entry at all?
Or is that a Jenkins bug?

> /niklas

Re: [Jenkins] Unable to locate the default Javac Compiler (ubuntu2)

Posted by Niklas Gustavsson <ni...@protocol7.com>.
On Tue, Nov 29, 2011 at 8:08 PM, sebb <se...@gmail.com> wrote:
> The HttpComponents build keeps getting an error such as  [1]:
>
> [ERROR] Unable to locate the Javac Compiler in:
>  /usr/lib/jvm/java-6-openjdk/jre/../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.
>
> The same build works fine on ubuntu3 and ubuntu5
>
> Is ubuntu2 supposed to be different, or is that an oversight?
>
> At present, the build job uses the (Default) compiler.
>
> I can change that to use a specific version, but I would expect the
> (default) to work on all systems that have a Java compiler.

There is no such guarantee, you should always tie your build to a
specific version provided in Jenkins.

/niklas