I've been trying to get my report working for few days but still no luck. I have no idea if it's something wrong with the dependencies.
I asked this question previously.
Anyway i just want to know if anyone have used JasperReports 6 with JDK 8? after all i doubt if these are compatible.
Update your JDT
   <dependency>
        <groupId>net.sf.jasperreports</groupId>
        <artifactId>jasperreports</artifactId>
        <version>5.6.1</version>
        <exclusions>
            <exclusion>
                <groupId>eclipse</groupId>
                <artifactId>jdtcore</artifactId>
            </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jdt.core.compiler</groupId>
        <artifactId>ecj</artifactId>
        <version>4.4</version>
    </dependency>
Source : How to Run JasperReport with Java 8
I just figured out the issue after trying few days. My report didn't work not due to an incompatibility issue. But because i haven't used
JasperPrint jp = JasperFillManager.fillReport(jr, param, new JREmptyDataSource());
instead of
JasperPrint jp = JasperFillManager.fillReport(jr, param);
Yes. JDK 8 is compatible with JasperReports 6.
JasperReports doesn't have enough community support i had to figure this out by my self. Anyway i suggest that JasperReports library should be much improved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With