Java 6 and Maven on Mac OS X Leopard
This morning I was having problems with Java and Maven on my Mac. I had my JAVA_HOME set to /Library/Java/Home, which was pointing to Java 6. When I ran mvn -v, Maven told me it was pointing to Java 5. I couldn’t figure out what was wrong because running java -version showed me Java 6.
The solution, which I found in this post, was to set my JAVA_HOME to the actual place where Java is installed, which is something like:
This worked for me, but YMMV.