如何在Jaspersoft Studio中使用外部JAR文件 [英] How to use external JAR file in JasperSoft Studio

查看:61
本文介绍了如何在Jaspersoft Studio中使用外部JAR文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在iReport中有一个项目,我想在Jasper studio中构建这个项目,因为我使用了一些外部JAR文件来转换日期,但在Jasper Studio中我无法使用它们,我在right click on project folder > properties > java build path > libraries > add External JARs..中添加了这些JAR文件,当我想查看报表预览时出现错误:

net.sf.jasperreports.engine.JRException: Errors were encountered when compiling report expressions class file:
1. com.ghasemkiani.util.icu.PersianDateFormat cannot be resolved to a type
                value = new com.ghasemkiani.util.icu.PersianDateFormat("yyyy/MM/dd").format(((java.sql.Timestamp)field_ORDERDATE.getValue())); //$JR_EXPR_ID=9$
                            <---------------------------------------->
2. com.ghasemkiani.util.icu.PersianDateFormat cannot be resolved to a type
                value = new com.ghasemkiani.util.icu.PersianDateFormat("yyyy/MM/dd").format(((java.sql.Timestamp)field_ORDERDATE.getOldValue())); //$JR_EXPR_ID=9$
                            <----------------------------------------> 

所以,我的问题是:如何添加外部JAR文件并使用它?

推荐答案

将JAR文件添加到生成路径后,必须重新启动Jasper Studio。

这篇关于如何在Jaspersoft Studio中使用外部JAR文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆