Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/343.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 如何从.jrxml获取.jasper文件_Java_Build_Jasper Reports - Fatal编程技术网

Java 如何从.jrxml获取.jasper文件

Java 如何从.jrxml获取.jasper文件,java,build,jasper-reports,Java,Build,Jasper Reports,在eclipse中,当我运行下面的构建脚本以便能够从.jrxml中获取.jasper文件时,我遇到以下错误: build.xml:16: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory Build.xml: <?xml version="1.0" encoding="UTF-8"?> <project name="jasperreports" default="compile" b

在eclipse中,当我运行下面的构建脚本以便能够从.jrxml中获取.jasper文件时,我遇到以下错误:

build.xml:16: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
Build.xml:

<?xml version="1.0" encoding="UTF-8"?>
  <project name="jasperreports" default="compile" basedir=".">
  <path id="classpath">
        <pathelement location="."/>
        <fileset dir="lib" erroronmissingdir="false">
            <include name="**/*.jar"/>
        </fileset>
  </path>
  <target name="compile">
            <taskdef name="jrc" classname="net.sf.jasperreports.ant.JRAntCompileTask"> 
                <classpath refid="classpath"/>
            </taskdef>
            <jrc 
                destdir="reports"
                tempdir="reports"
                keepjava="false">
                <src>
                    <fileset dir="reports">
                        <include name="**/*.jrxml"/>
                    </fileset>
                </src>
                <classpath refid="classpath"/>
            </jrc>
    </target>
</project>


这意味着您必须在项目的构建路径中添加…

我已经在下面添加了jar到lib文件夹和类路径,完成了:commons-flow.jar barbge-1.5-beta1 barcode4j-2.0 commons-beanutils-1.8.0 commons-collections-2.1 commons-javaflow.jar commons-javaflow-20060411 jline-0.9.94 js-1.7R1.8.2-api-1.0 saaj-api-1.3spring-beans-2.5 spring-core-2.5 xml-api-1.3.04