I am having a problem with Apache Buildr complaining about an invalid source release. Whenever I try to create my project, I get the following error message:
javac: invalid source release: 1.7 Usage: javac <options> <source files> use -help for a list of possible options Buildr aborted! RuntimeError : Failed to compile, see errors above
It can be assumed that I do not have Java 7 installed on my system, but when I run javac -version , I get javac 1.7.0-u10-b08 , that is, the OpenJDK that I just installed.
What's going on here? My first assumption was that Buildr was starting the wrong version of Java, but I do not know how to fix or confirm this.
To give some insight into this issue, I run Mac OS X version 8 (Mountain Lion) and installed OpenJDK from http://code.google.com/p/openjdk-osx-build/ . I use RVM to manage Ruby and install Buildr using env JAVA_HOME=$JAVA_HOME gem install buildr , as recommended in the documentation. My JAVA_HOME is installed in /Library/Java/JavaVirtualMachines/1.7.0u.jdk/Contents/Home , where I installed OpenJDK.
If anyone could help me, I would really appreciate it.
UPDATE: It seems that Buildr just does not respect my JAVA_HOME. I turned on and unchecked the Java system version (version 6) in the Java settings and now I get another error,
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
source share