Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does JDK 8 supports JasperReports 6?

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.

like image 997
Hasith Magage Avatar asked Mar 10 '15 07:03

Hasith Magage


2 Answers

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

like image 54
Neeraj Jain Avatar answered Nov 09 '22 07:11

Neeraj Jain


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.

like image 4
Hasith Magage Avatar answered Nov 09 '22 05:11

Hasith Magage