FileNotFoundException Jasperreports

前端 未结 1 1341
无人共我
无人共我 2021-01-22 08:04
  1. I am loading an jrxml file in netbeans which is succefully loaded.
    But when I\'m deploying it as a jar file it gives the below error:

Error

相关标签:
1条回答
  • 2021-01-22 08:38

    I doubt the dir named srcis in you jar

    try getting an InputStream using ClassLoader's method getResourceAsStream to your packed jrmx file and pass it to the JRXmlLoader's load method that takes an InputStream as argument.

    the argument for getResourceAsStream should be the full qualified name of the jrxml in your jar. That is, including the package name.

    0 讨论(0)
提交回复
热议问题