博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
解决ant编译中出现“includeantruntime was not set”警告的问题
阅读量:2397 次
发布时间:2019-05-10

本文共 639 字,大约阅读时间需要 2 分钟。

执行ant编译时,总会出现如下的警告:
[javac] D:\SnowPad\build.xml:26: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
虽然不影响编译,但还是解决才安心。其实解决方法也很简单,只需要根据提示在javac任务中添加includeAntRuntime="false"属性即可。例如:

修改前:

修改后:

注:
1.对于includeAntRuntime属性,官方的解释如下:
Whether to include the Ant run-time libraries in the classpath; defaults to yes, unless build.sysclasspath is set. It is usually best to set this to false so the script's behavior is not sensitive to the environment in which it is run.
2.此警告在较早的ant版本中可能不会出现,当前用的版本是:Apache Ant(TM) version 1.8.2 compiled on December 20 2010。所以此问题跟ant版本有关。

转载地址:http://aydob.baihongyu.com/

你可能感兴趣的文章
[转载]J2ME Wireless Toolkit 2.2 新改进
查看>>
[转载]使用JAVA中的动态代理实现数据库连接池
查看>>
[转载]驾驭 Eclipse 功能部件
查看>>
[转载]jdbc中如何处理Oracle BLOB字段
查看>>
[转载]Java、XML与数据库编程实践(一)
查看>>
[转载]防止到 String 类的不恰当的类型转换
查看>>
[转载]怎样使用AJAX进行WEB应用程序开发
查看>>
[转载]类装入问题解密,第 4 部分: 死锁和约束
查看>>
[转载]使用 Eclipse Modeling Framework 进行建模,第 3 部分
查看>>
[转载]J2ME中随机数字处理全攻略
查看>>
[转载]在spring MVC框架中显示xml视图
查看>>
[转载]扩展 Eclipse 的 Java 开发工具
查看>>
[转载]Java 语言中的 return 语句
查看>>
[转载]关注性能: 什么时候好的基准测试不好了
查看>>
[转载]IBM WebSphere 开发者技术期刊 : 使用 Eclipse 富客户端平台和 Rational Applic
查看>>
[转载]漫谈EJB在Java中的应用
查看>>
[转载]实时 Java,第 4 部分: 实时垃圾收集
查看>>
[转载]设计模式袖珍版nbsp;连续转载之nbsp;-nbsp;Template
查看>>
[转载]用JSP/Servlets实现Web方式的文件上传
查看>>
全面挖掘Java Excel API 使用方法
查看>>