I have a jar application that contains several reports (files .jasper
) and the way that I get the path of the report is:
getClass().getResource("/reportes/mireporte.jasper").toString();
but when I execute I get the next error: FileNotFoundException
although the report is within the jar file when I open it with the winrar.
My questions are:
- Is this the way to get the path of a report in a jar files?
- Is it possible to open reports that are within of a jar file?