Reports not showing after making Java .jar file?

Hi, I think this question was asked before but it didn't have an answer, I'm fairly new to Jasper Reports so I'm having trouble displaying it in my Java program after creating a .jar file for my Java program. I use IntelliJ and made a .jar file for my Java app and it uses reports which is located in the /src folder of the project, the app looks for the .jrxml file in that folder and displays it in my swing app. It works fine when I'm running the app on the IDE but when I created a .jar file and moved the .jar file to another folder and run the program, the part where the reports are loaded is not showing anything. Should I be configuring something in IntelliJ to add the .jrxml file in the .jar file? Am I missing something while building this app? I also moved the .jrxml files to the .jar folder and still nothing. Thanks for the answers, if any, in advance.

ml.francis's picture
Joined: Sep 2 2014 - 1:19am
Last seen: 2 years 7 months ago

1 Answer:

I store my jrxml in the folder resources -> jasperreports -> templates -> someNameReportJasperTemplate.jrxml. Use next path:

/jasperreports/templates/someNameReportJasperTemplate.jrxml
alfpunk's picture
306
Joined: Apr 30 2020 - 1:04am
Last seen: 1 year 7 months ago
Feedback
randomness