jasperreports icon indicating copy to clipboard operation
jasperreports copied to clipboard

Interest in Java Compiler API based compiler

Open marschall opened this issue 2 years ago • 3 comments

I have been working on a compiler based on the built-in JSR 199 JavaCompiler API. This has the advantage that anybody deploying on a JDK (since Java 9 there is more JRE) or has the java.compiler module needs no external dependency. There is also an EJC based implementation.

I would be willing to create a PR and donate the code. The code has only received minimal testing.

marschall avatar Jul 26 '21 17:07 marschall

A JSR 199 based report compiler would be a useful and convenient feature for JasperReports. We did consider it at some point, but if I recall correctly we found something that was not working as we expected it.

Thank you for the contribution.

dadza avatar Jul 27 '21 06:07 dadza

@dadza do you know what caused issues?

marschall avatar Jul 27 '21 10:07 marschall

It was a long time ago, but I think the problem was that we didn't find a way to have the compiler resolve classes from the context classloader, which is something that the ECJ based report compiler supported. That's not a mandatory feature though.

dadza avatar Jul 27 '21 14:07 dadza