Search
Calendar
June 2025
S M T W T F S
« May    
1234567
891011121314
15161718192021
22232425262728
2930  
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