javac1.8 class not found

Class not found: javac1.8

This error is known to happen with Apache Ant versions less than 1.9.0 – which aren’t compatible with Java 8. If you’re using a version of Ant < 1.9.0, you should update to a 1.9.x release.

Here is the related bug report: https://issues.apache.org/bugzilla/show_bug.cgi?id=53347

Btw, if you just want to compile with Java 8, but don’t need to compile any actual Java 8 syntax, then you can pass the following argument to javac as a workaround, which would allow you to continue using an older version of Ant:

-Dbuild.compiler=javac1.7

Leave a Comment