Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

java - How to use external JAR file in JasperSoft Studio

I have project in iReport, I want to build this in jasper studio,in that I use some external jar file to convert date, but in jasper studio I cant use them, I add those jar file in right click on project folder > properties > java build path > libraries > add External JARs.., I get error when I want to see report preview :

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$
                            <----------------------------------------> 

so,my question is : how can I add external jar file and use it?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

After you have added jar file to build path you have to restart your Jasper Studio.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...