Gradle 1.2-rc-1 does not honor Java Preferences on OS X


(Diwaker Gupta) #1

I’ve installed JDK 1.7u7 from Oracle on my Mac OS X (Mountain Lion). I have multiple other JDKs installed. Gradle 1.2-rc-1 doesn’t seem to honor the default preferences (System -> Java Preferences):

  $ which java  /usr/bin/java

 $ java -version  java version "1.7.0_07"  Java(TM) SE Runtime Environment (build 1.7.0_07-b10)  Java HotSpot(TM) 64-Bit Server VM (build 23.3-b01, mixed mode)

 $ ./gradlew --version  ------------------------------------------------------------  Gradle 1.2-rc-1  ------------------------------------------------------------

 Gradle build time: Tuesday, September 4, 2012 5:49:54 PM UTC  Groovy: 1.8.6  Ant: Apache Ant(TM) version 1.8.4 compiled on May 22 2012  Ivy: 2.2.0  JVM: 1.7.0_05 (Oracle Corporation 23.1-b03)  OS: Mac OS X 10.8.1 x86_64

 $ /usr/libexec/java_home  /Library/Java/JavaVirtualMachines/jdk1.7.0_07.jdk/Contents/Home  

(Diwaker Gupta) #2

Never mind, seems I had an confused JAVA_HOME :-/ Please mark as closed