使用ant编译项目时,输出如下的日志:
[javac] 警告:[path] 错误的路径元素 "2.1.1.0\lib\jaxb-impl-2.2.5.jar":无此文件或目录
[javac] 警告:[path] 错误的路径元素 "2.1.1.0\lib\jaxb-impl-2.1.13.jar":无此文件或目录
但是在此目录下存在相应的jaxb-impl.jar包。其他用到的包也是这样的情况,请问该怎么处理呢?
build.xml中编译的ant脚本是这样的:
<target name="compile">
<mkdir dir="classes" />
<javac compiler="modern" srcdir="src" destdir="classes" debug="true">
<compilerarg value="-Xlint"/>
<classpath refid="classpath"/>
</javac>
<javac compiler="modern" srcdir="test" destdir="classes" debug="true">
<compilerarg value="-Xlint"/>
<classpath refid="classpath"/>
</javac>
<!-- 拷贝源码里面的一些资源文件 -->
<copy todir="classes">
<fileset dir="src">
<exclude name="**/*.java" />
<exclude name="**/.*" />
</fileset>
</copy>
</target>
When ant compiles, it prompts that a lot of software packages do not exist
Solution:
Put the jar package in the project's lib in the ext directory of jdk's jre
For example, java home is D:JavaEEJavajdk1.8.0_112 directory
You put the jar packages jaxb-impl-2.2.5.jar and jaxb-impl-2.1.13.jar under your project's lib into the D:JavaEEJavajdk1.8.0_112jrelibext directory Just download
and recompile with ant
These warnings can be ignored, but it is still unknown where the warnings come from.