打包为jar运行报错

<p>Error: A JNI error has occurred, please check your installation and try again<br>
Exception in thread &quot;main&quot; java.lang.NoClassDefFoundError: org/jfree/chart/ChartPanel<br>
at java.lang.Class.getDeclaredMethods0(Native Method)<br>
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)<br>
at java.lang.Class.privateGetMethodRecursive(Class.java:3048)<br>
at java.lang.Class.getMethod0(Class.java:3018)<br>
at java.lang.Class.getMethod(Class.java:1784)<br>
at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544)<br>
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526)<br>
Caused by: java.lang.ClassNotFoundException: org.jfree.chart.ChartPanel<br>
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)<br>
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)<br>
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)<br>
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)<br>
... 7 more</p>
<p>网上搜索是因为java版本的问题,可是目前截图都是java8<img src="https://img2020.cnblogs.com/blog/1190534/202103/1190534-20210331135240335-1051050274.png" alt="" loading="lazy"><br>
<img src="https://img2020.cnblogs.com/blog/1190534/202103/1190534-20210331135321915-2103045207.png" alt="" loading="lazy"><br>
程序使用了jfreechart包。<br>
<img src="https://img2020.cnblogs.com/blog/1190534/202103/1190534-20210331141629431-850806976.png" alt="" loading="lazy"></p>

回答

jfreechart 这个包没有打包进来吗?

以上是打包为jar运行报错的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>