我需要与我的应用程序捆绑哪些特定的 jar 才能运行 JasperReports?

发布于 2024-12-29 01:55:49 字数 158 浏览 2 评论 0原文

我构建了一个使用 JasperReports 的 swing 应用程序。我已经捆绑了 JasperReports 附带的所有 jar,它们构成了我的安装文件的大部分。

我可以只包含 jasperreports-4.1.2.jar,还是我真的需要所有额外的 jar 才能运行我的应用程序?

I've built a swing app that uses JasperReports. I've been bundling all the jars that JasperReports comes with which makes up the majority of my install file.

Can I just include jasperreports-4.1.2.jar, or do i really need all the extra jars to be able to run my app?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

无畏 2025-01-05 01:55:49

您需要这些文件:
jasperreports-4.1.2/dist/jasperreports-4.1.2.jar
jasperreports-4.1.2/dist/jasperreports-applet-4.1.2.jar
jasperreports-4.1.2/dist/jasperreports-fonts-4.1.2.jar
jasperreports-4.1.2/dist/jasperreports-javaflow-4.1.2.jar
(如果不使用 DejaVu 字体,可以删除字体 jar。)

jasperreports-4.1.2/lib 中有 54 个 jar
您肯定不需要全部。您只需要...您使用的那些。但对于您需要哪些,没有简单的答案。

如果您从未在报告中使用 groovy,那么无需 groovy-all-1.7.5.jar 就可以了。如果您从不生成 PDF,那么没有 iText 也没什么问题。如果您没有图表,那么您就不会错过jfreechart。仅当您生成条形码时才会使用烧烤库。等等。

当然,从某种意义上说,将它们全部运送是最安全的。那么你就不能错过任何东西。但如果您确定不需要某些功能,那么只需包含您需要的功能即可。有些是显而易见的,但并非全部都是。

抱歉,没有更简单的答案。也许可以按大小排序,去掉一些较大的,然后进行测试以确保没有损坏任何东西。

You need these files:
jasperreports-4.1.2/dist/jasperreports-4.1.2.jar
jasperreports-4.1.2/dist/jasperreports-applet-4.1.2.jar
jasperreports-4.1.2/dist/jasperreports-fonts-4.1.2.jar
jasperreports-4.1.2/dist/jasperreports-javaflow-4.1.2.jar
(You can get rid of the fonts jar if you do not use the DejaVu font.)

There are 54 jars in jasperreports-4.1.2/lib
You surely don't need them all. You only need... the ones that you use. But there is no simple answer to which ones you need.

If you never use groovy in your reports, then you'll be fine without groovy-all-1.7.5.jar. If you never generate PDFs, then you'll be fine without iText. If you have no charts, then you won't miss jfreechart. The barbecue lib is used only if you generate bar codes. Et cetera.

Of course in one sense it's safest to ship them all. Then you cannot be missing anything. But if you're certain about not needing certain features, then just include the ones you need. Some are obvious, but not all of them are.

Sorry, but there's no simpler answer. Maybe sort by size, get rid of some of the bigger ones, and then test to be sure you didn't break anything.

乜一 2025-01-05 01:55:49

是的,您将需要大多数(如果不是全部)与 jasper reports 分发版捆绑在一起的 jar

Yes, you would need most if not all of the jars bundled with jasper reports distribution

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文