Ant does weird things with this sometimes. Which OS is this running
on? Look at your ant script... it may be calling scripts that
override your default environment, e.g. this snippet in the ant script
Darwin*) darwin=true
if [ -z "$JAVA_HOME" ] ; then
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Home
fi
;;
---Mark
On Sat, Aug 8, 2009 at 4:39 PM, Curt Micol<[email protected]> wrote:
> On Sat, Aug 8, 2009 at 7:13 PM, Michael Greene<[email protected]>
> wrote:
>> This is what happens when you compile using Java 1.5. Cassandra requires
>> Java 1.6+. You can either setup JAVA_HOME or setup your system preferences
>> to point to a supported version of Java.
>
> Interesting, I've never had issue with this before:
>
> [dragn:~/src/svn/cassandra]$ echo $PATH
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin:/opt/local/bin:/Users/cbm/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
> [dragn:~/src/svn/cassandra]$ echo $JAVA_HOME
> /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home
>
> But sure enough, ant is using Java 1.5:
>
> [dragn:~/src/svn/cassandra]$ ant -v
> Apache Ant version 1.7.0 compiled on May 21 2009
> Buildfile: build.xml
> Detected Java version: 1.5 in:
> /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home
> Detected OS: Mac OS X
>
> Any ideas how to get this to hit 1.6? Like I mentioned, when I setup
> the PATH and JAVA_HOME I had no issue, and none since (I've probably
> ran 'ant test' once a week for 3-4 weeks now). I am curious how ant
> suddenly wouldn't use my env.
>
> Thanks for your help,
>
> --
> # Curt Micol
>