使用ant build build.xml报“includeantruntime was not set”警告及"Class not found: javac1.8"问题...

问题1:ant编译build.xml报“includeantruntime was not set”警告。

警告详情:

1 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版本有关。

 

问题2:ant编译时,报"Class not found: javac1.8"error

问题原因:myeclipse中自带的ant插件版本太低。

解决方法:重新下载ant版本,并配置环境变量。

  配置环境变量:ANT_HOME, path,classpath.

  更换MyEclipse中的Ant为自己指定的。方法:Window >>Preferences>>Ant>>Runtime选中右边框中的Ant Home Entries,点击Add Home按钮;选择你自己的安装目录。

转载于:https://www.cnblogs.com/wmcoder/p/6798379.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值