Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/394.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 不提供相同的类文件_Java_Ant_Build - Fatal编程技术网

Java 不提供相同的类文件

Java 不提供相同的类文件,java,ant,build,Java,Ant,Build,我使用一个ant构建文件为我的项目创建了一个jar。 因此,构建的jar无法工作。 这是我的build.xml文件 <javac destdir="${build.dir}" srcdir="${src.dir}" source="1.5" target="1.5" > <compilerarg value="-Xlint:unchecked"/> <classpath refid="master-classpath"/>

我使用一个ant构建文件为我的项目创建了一个jar。 因此,构建的jar无法工作。 这是我的build.xml文件

 <javac destdir="${build.dir}" srcdir="${src.dir}" source="1.5" target="1.5" >
        <compilerarg value="-Xlint:unchecked"/>
        <classpath refid="master-classpath"/>
 </javac>

在ant脚本中设置目标版本。比如:

<javac destdir="${build.dir}" srcdir="${src.dir}" source="1.6" target="1.6" >


在eclipse上进行扩展时使用的java版本是什么?你能发布一个错误吗?它使用java 1.6版本。错误是线程“main”java.lang.NoSuchMethodError中的异常:com.org.nms.common.LookAndFeel.getInstance()了解nosuchmethod的不同原因:谢谢Aksel Willgert。我发现从ant build获得的类使用的是Java1.5。我怎样才能解决这个问题