問題1:ant編譯build.xml報「includeantruntime was not set」警告。java
警告詳情:less
1 warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
解決方法:eclipse
根據提示在javac任務中添加includeAntRuntime="false"屬性便可。例如:
ui
注:1.對於includeAntRuntime屬性,解釋以下:this
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版本有關。spa
問題2:ant編譯時,報"Class not found: javac1.8"error插件
問題緣由:myeclipse中自帶的ant插件版本過低。code
解決方法:從新下載ant版本,並配置環境變量。xml
配置環境變量:ANT_HOME, path,classpath.blog
更換MyEclipse中的Ant爲本身指定的。方法:Window >>Preferences>>Ant>>Runtime選中右邊框中的Ant Home Entries,點擊Add Home按鈕;選擇你本身的安裝目錄。