[英]How to resolve: [javac] This version of java does not support the classic compiler; upgrading to modern
我們公司最近將構建環境從本地計算機移至了docker shell。 這導致使用ant和java進行編譯的舊工具失敗。 我對編譯Java不熟悉,所以請多多包涵。
我們已經安裝了:
現在,該工具可以編譯,但是具有以下錯誤/警告:
[javac] This version of java does not support the classic compiler; upgrading to modern
您知道這是什么原因嗎? ant 1.7.1與Java版本之間是否不匹配?
我在ant build .xml文件中添加了fork =“ true”,錯誤/警告消失了。 我不明白為什么?
<javac destdir="classes"
debug="on"
includeantruntime="false"
fork="true" > // <-- Somehow fork="true" got rid of warning/error.
通過在build .xml中添加以下內容來解決:
<property name="build.compiler" value="modern" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.