how to get jasper report file path in localsystem

Hi Sir,


My code is

InputStream input = new FileInputStream(new File("./Reports/ipr.jrxml"));
System.out.println("get into Report");
JasperDesign jasperDesign = JRXmlLoader.load(input);
System.out.println("Compiling Report Designs");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);


i got the following error while running in tomcat server C:\Program Files (x86)\Apache Software Foundation\Tomcat 7.0.\Reports\opbill.jrxml(The system cannot find the path specified)


Any help would be  appreciated



Harsha Infotech




webmaster_8's picture
Joined: Sep 27 2013 - 10:13pm
Last seen: 9 years 10 months ago

1 Answer:

Hello Harsha,

This is link to part of your question:  just an overview.

With your line: JasperDesign jasperDesign = JRXmlLoader.load(input); try and put the whole statemnt here.
JasperDesign jasperDesign = JRXmlLoader.load (new FileInputStream(new File("./Reports/ipr.jrxml"));
If this does not work then I would say you need to give the full file path name for said file, or create a directory which is defined in your development enviroment.  Also I would print out "Input" just to see what you are really getting.
Hope this helps.


Java_Jasper's picture
Joined: Jan 17 2012 - 10:13am
Last seen: 7 years 10 months ago