Resolved: javac: invalid target release: 1.6
javac: invalid target release: 1.6 :
Recently I ran into this while compiling some stuff through Maven. My development environment is Mac OS X(10.5), Eclipse (3.5), Maven (2.0.9), Java (1.6)
I tried some suggestions through Google but they didn’t help me. Finally resolved the isse. Follow this steps:
- Check if JAVA_HOME is set
- Check if PATH is set & it’s pointing to same Java version
- Now another important thing – Run mvn –version, check if the Java version matches.
(Mac Users)If do this: Check your CurrentJDK path defined under "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK". That is most likely the culprit. Maven script uses this symlink value.
You are hopefully done 🙂
November 21st, 2009 in
Uncategorized
It may be two-and-a-half years after this was written, but, thanks to the vagaries of the internet, it was the first site listed on Google, and it solved my problem immediately. Many thanks.
it worked for me. . thanks 🙂
2012 and still working your site.. thanks