title: net.sf.jasperreports.engine.JRException Error when running jar file, but run fine in IDE
body: <p>I just wrote a program in Eclipse (2022-03) as simple Java project (not even maven) that read excel on my computer into java (using Apache POI library) and write it to jasper report.
  It run in Eclipse and report is generated perfectly fine. But when I export as runnable JAR and run it via command line, it got errors eventhough I include all the needed libraries in the JAR, include jasperreports-6.19.1.jar and poi-5.2.2.jar set.
  I tried both jdk 1.8 and jdk 12.0.2, both fail.</p>
  <p>run by command: java -jar .\jarname.jar</p>
  <p>This is the error</p>
  <pre><code>net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:18: error: cannot find symbol
  public class Condo_1651557749766_654059 extends JREvaluator
                                                  ^
    symbol: class JREvaluator
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:25: error: cannot find symbol
      private JRFillParameter parameter_MONTH = null;
              ^
    symbol:   class JRFillParameter
    location: class Condo_1651557749766_654059
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:26: error: cannot find symbol
      private JRFillParameter parameter_YEAR = null;
              ^
    symbol:   class JRFillParameter
    location: class Condo_1651557749766_654059
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:27: error: cannot find symbol
      private JRFillField field_roomType = null;
              ^
    symbol:   class JRFillField
    location: class Condo_1651557749766_654059
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:4: error: package net.sf.jasperreports.engine does not exist
  import net.sf.jasperreports.engine.*;
  ^
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:5: error: package net.sf.jasperreports.engine.fill does not exist
  import net.sf.jasperreports.engine.fill.*;
  ^
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:50: error: cannot find symbol
          parameter_MONTH = (JRFillParameter)pm.get(&quot;MONTH&quot;);
                             ^
    symbol:   class JRFillParameter
    location: class Condo_1651557749766_654059
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:51: error: cannot find symbol
          parameter_YEAR = (JRFillParameter)pm.get(&quot;YEAR&quot;);
                            ^
    symbol:   class JRFillParameter
    location: class Condo_1651557749766_654059
  D:\eclipse-workspace\Rent\Condo_1651557749766_654059.java:60: error: cannot find symbol
          field_roomType = (JRFillField)fm.get(&quot;roomType&quot;);
                            ^
    symbol:   class JRFillField
    location: class Condo_1651557749766_654059
  9 errors
  .
          at net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:229)
          at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:358)
          at net.sf.jasperreports.engine.JasperCompileManager.compile(JasperCompileManager.java:344)
          at net.sf.jasperreports.engine.JasperCompileManager.compileReport(JasperCompileManager.java:609)
          at GenerateJasper.generateReport(GenerateJasper.java:40)
          at ExcelRead.main(ExcelRead.java:86)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
          at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
          at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
          at java.base/java.lang.reflect.Method.invoke(Method.java:567)
          at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
  </code></pre>
  <p>And this is part of my code that use jasper report library</p>
  <pre><code>try {
              JRDataSource jrDataSource = new JRBeanCollectionDataSource(dataList);
   
   
              HashMap&lt;String, Object&gt; dataParam = new HashMap&lt;&gt;();
              dataParam.put(&quot;MONTH&quot;, date.substring(0, 2));
              dataParam.put(&quot;YEAR&quot;, date.substring(2, 6));
   
              InputStream input = new BufferedInputStream(new FileInputStream(&quot;/eclipse-workspace/Rent/jasper/Condo.jrxml&quot;));
              JasperReport jasperReport = JasperCompileManager.compileReport(input);
              JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, dataParam, jrDataSource);
              OutputStream output = new FileOutputStream(new File(outputPath+&quot;/&quot;+outputName));
              JasperExportManager.exportReportToPdfStream(jasperPrint, output);
          } catch (Exception e) {
              e.printStackTrace();
          }
  </code></pre>
  <p>Could anyone help me?</p>