I met exactly the same problem few months ago and yes, you need to set
JAVA_HOME properly ...
but I currently don't remember the exact reason behind this - though this is
Mac only :(
May be someone will have the correct explanation !

On Mon, May 11, 2009 at 9:57 PM, Jeppe Nejsum Madsen <[email protected]>wrote:

> Hi
>
> I'm struggling with Gradle on OS X and it seems either Gradle's
> startup script is not correct or my knowledge of Java on OS X is
> limited (entirely possible :-)
>
> My build (which requires JDK6) used to work on OS X 10.5.6 , but after
> I installed XCode I think it installed Java 5 as default. I then
> configured Java 6 as default (using the the provided Java control
> panel)
>
> $ java -version
> java version "1.6.0_07"
> Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
> Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
>
> But when I launch gradle, it still uses Java 5:
>  ~/gradle/gradle-0.5.2/bin/gradle -v
>
> ----------------------------------------
> Gradle 0.6-20090504092526+0200
> ----------------------------------------
>
> Gradle buildtime: 4. maj 2009 09:25:26 CEST
> Groovy: 1.5.6
> Ant: Apache Ant version 1.7.0 compiled on December 13 2006
> Ivy: 2.0.0-rc2
> Java: 1.5.0_16
> JVM: 1.5.0_16-133
> JVM Vendor: Apple Inc.
> OS Name: Mac OS X
>
> I don't have JAVA_HOME defined and looking at the gradle startup
> script, it seems to look in Library/Java/Home first. This contain
> java5 which doesn't match the selected default JRE. Or am I just
> confused about java on OS X?
>
> Setting JAVA_HOME solves the problem, but I was wondering if this
> should be necessary?
>
> /Jeppe
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>
>


-- 

PGP KeyID: 1024D/47172155
FingerPrint: C739 8B3C 5ABF 127F CCFA  5835 F673 370B 4717 2155

http://cheztog.blogspot.com

Reply via email to