• 使用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按钮;选择你自己的安装目录。

  • 相关阅读:
    Python爬取数据(基础,从0开始)
    个人作业——软件测评
    结对第二次作业
    结对第一次作业
    寒假作业(2/2)
    个人作业———软工实践课程总结
    Axios 介绍和使用
    软件评测
    结对第二次作业
    结对第一次——疫情统计可视化(原型设计)
  • 原文地址:https://www.cnblogs.com/wmcoder/p/6798379.html
Copyright © 2020-2023  润新知