title: Buildr complaining about javac: invalid source release: 1.7
body: <p>I am having an issue with Apache's Buildr complaining about an invalid source release. Whenever I try and build my project I get the following error message;</p>
  
  <pre><code>javac: invalid source release: 1.7
  Usage: javac &lt;options&gt; &lt;source files&gt;
  use -help for a list of possible options
  Buildr aborted!
  RuntimeError : Failed to compile, see errors above
  </code></pre>
  
  <p>One would assume I don't have Java 7 installed on my system, but when I execute <code>javac -version</code> I get <code>javac 1.7.0-u10-b08</code>, which is the OpenJDK I just installed. </p>
  
  <p>What is going on here? My first guess would be that Buildr is running the wrong version of Java but I have no idea how to fix or confirm that.</p>
  
  <p>To give some background to this question, I am running Mac OS X version 8 (Mountain Lion) and have installed the OpenJDK from <a href="http://code.google.com/p/openjdk-osx-build/" rel="nofollow">http://code.google.com/p/openjdk-osx-build/</a>. I am using RVM to manage Ruby and installed Buildr using <code>env JAVA_HOME=$JAVA_HOME gem install buildr</code> as recommend in the documentation. My JAVA_HOME is set to <code>/Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home</code>, which is where I installed the OpenJDK.</p>
  
  <p>If anyone could help me here I would really appreciate it.</p>
  
  <p><strong>UPDATE:</strong>
  It really looks like Buildr is just not respecting my JAVA_HOME. I went in and unchecked the system version (version 6) of Java in the Java Preferences and now I get a different error,</p>
  
  <pre><code>JavaVM: requested Java version ((null)) not available. Using Java at "" instead.
  JavaVM: Failed to load JVM: /bundle/Libraries/libserver.dylib
  JavaVM FATAL: Failed to load the jvm library.
  Buildr aborted!
  RuntimeError : can't create Java VM
  </code></pre>