Posted on 2008-06-04 16:48
yuyu 阅读(1168)
评论(1) 编辑 收藏
jsreport遇到了一个很郁闷的问题总是出现
报表文件有错:Errors were encountered when compiling report expressions class file: D:\server\tomcat5.0.28\bin\mytest_1212552692656_858465.java:4: 软件包 net.sf.jasperreports.engine 不存在 import net.sf.jasperreports.engine.*; ^ D:\server\tomcat5.0.28\bin\mytest_1212552692656_858465.java:5: 软件包 net.sf.jasperreports.engine.fill 不存在 import net.sf.jasperreports.engine.fill.*; ^ D:\server\tomcat5.0.28
找了很长时间最后终于搞定,强行指定编译的classpath
String classPath = "yourpath";
JRProperties.setProperty(JRProperties.COMPILER_CLASSPATH, classPath);