File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Accessing reports gives net.sf.jasperreports.engine.JRException: java.io.FileNotFoundException

 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello.
I have created an application and converted it into jar file

Here is the structure of jar (which i got after extracting it)
MyApp
META-INF
org
----nit
----other directories
required libraries and jars
.jasper files

Here is the codes :

MyiReportViewer.java


MainUI.java

[/code]
 
Paul Clapham
Sheriff
Pie
Posts: 20177
25
MySQL Database
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
java.io.FileNotFoundException: List Of Staffs.jasper


This is quite straightforward. There was no file by that name in the current working directory when you ran the application.
 
Kunal Lakhani
Ranch Hand
Posts: 622
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul Clapham for your reply. I have mentioned the structure of jar and location of all .jasper files.


I have also tried with "/List Of Staffs.jasper" in the code
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic