[英]executing ant clean, Build Failed, Wrong java Version
我正在嘗試安裝 hybris,但是在安裝時我在執行ant clean命令時遇到了問題。
我正在使用應該可以工作的最新版本的java。 我也在正確的路徑中使用了 setantenv.bat 。
這是堆棧跟蹤:
Apache Ant(TM) version 1.9.1 compiled on May 15 2013
C:\work\trail\hybris\bin\platform>**ant clean**
Java HotSpot(TM) Client VM warning: ignoring option MaxPermSize=128M; support
s removed in 8.0
Buildfile: C:\work\trail\hybris\bin\platform\build.xml
[echo] C:\work\trail\hybris\bin\platform/tomcat/bin
**BUILD FAILED**
C:\work\trail\hybris\bin\platform\build.xml:20: The following error occurred w
le executing this line:
C:\work\trail\hybris\bin\platform\resources\ant\antmacros.xml:73: The followin
error occurred while executing this line:
C:\work\trail\hybris\bin\platform\resources\ant\util.xml:234: -
**** **WRONG JAVA VERSION** ****
Environment check failed: You are using a not supported version of Java.
Please make sure you are using Java version 1.7 or later.
Your current Java version is: 1.8.0_40
TIP: If you are using eclipse you can configure a different JVM under
Preferences->Java->Installed JREs.
Total time: 1 second
由於您能夠讓 Hybris 與 JDK 7 一起工作,因此 Java JDK 版本 1.8.0_40 似乎不具有對 Hybris 5.2.0.6 的向后兼容性/支持。 如果您感到無畏,您可能想打開 Hybris 的錯誤。
在eclipse中轉到平台- build.xml-右鍵單擊它-轉到運行方式-外部工具配置-轉到jre選項卡-在單獨的jre中添加所需的jre版本-再次將build.xml文件添加到ant並運行它
試試這個,在 util.xml 中的 platfrom 文件夾下添加 java 版本。 為我工作!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.