【发布时间】:2021-08-23 14:37:43
【问题描述】:
我正在运行当前设置:
- 操作系统:Win10
- Java:1.8 采用OpenJDK (JDK + JRE)
- 骡子:4.2.1 / Anypoint Studio 7.9
- Maven:嵌入在 Studio - 3.6.3
问题是:
Unable to execute Java command. The system cannot find the file specified. (0x2)
"C:\\Program Files\\AdoptOpenJDK\\jdk-8.0.282.8-hotspot\\bin\\bin\\javaw.exe" -version
Failed to retrieve the version of Java. Resolving to the lowest supported version (1.4).
Launching a JVM...
Unable to execute Java command. The system cannot find the file specified. (0x2)
"C:\\Program Files\\AdoptOpenJDK\\jdk-8.0.282.8-hotspot\\bin\\bin\\javaw.exe"
Win10 环境:
C:\Users\1>echo %JAVA_HOME% - C:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspotC:\Users\1>echo %PATH% - C:\Program Files\AdoptOpenJDK\jdk-8.0.282.8-hotspot\bin;C:\apache-maven-3.8.1-bin\apache-maven-3.8.1\bin;
这是来自问题描述下方的 Studio 项目的提示:
Advice:
Usually when the Wrapper fails to start the JVM process, it is
because of a problem with the value of the configured Java command.
Currently:
wrapper.java.command=C:\\Program Files\\AdoptOpenJDK\\jdk-8.0.282.8-hotspot\\bin\\bin\\javaw.exe
Please make sure that the PATH or any other referenced environment
variables are correctly defined for the current environment.
但它除了系统环境变量之外什么也没告诉我,但它们看起来是正确的。
我尝试过的:
- 检查环境变量(系统和用户) - 一切正常,还请队友确认
- Anypoint Studio 检查:运行正确 (1.8) Java、Maven (3.6.3) 和 Mule (4.2.1)
- Maven 和 Studio 配置文件 - 一切都正确(使用 %JAVA_HOME%)
我不知道 Studio 是从哪里获取第二个“垃圾箱”的,谢谢您的所有建议。
【问题讨论】:
标签: java maven jvm mule anypoint-studio