Search
Calendar
April 2024
S M T W T F S
« Sep    
 123456
78910111213
14151617181920
21222324252627
282930  
Your widget title
Archives

PostHeaderIcon javac: invalid flag: -s

Case

After updating my project and launching a build with Maven, I got this error:

[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
javac: invalid flag: -s
Usage: javac <options> <source files>

Fix

Indeed the version of Java in the pom.xml had been upgraded. To get rid of the error, update your $JAVA_HOME to use a JDK 6 and no more a JDK5.

Leave a Reply