我正在尝试使用 GraalVM 和本机图像构建本机应用程序。开始构建过程时发生错误。类路径中似乎缺少 cl.exe。就像 GraalVM 网站上提到的那样,我已经安装了“GRMSDKX_EN_DVD.iso”(适用于 Windows 7 和 .NET 的 Windows SDK)。我也试过为 Windows 10 安装 Windows SDK。
C:\Program Files (x86)\Microsoft Visual Studio\2019\Community>native-image -jar C:\Users\tm\Desktop\DemoGraalVM\target\Demo-1.0-SNAPSHOT.jar
[Demo-1.0-SNAPSHOT:28776] classlist: 2,435.83 ms, 1.16 GB
[Demo-1.0-SNAPSHOT:28776] setup: 646.59 ms, 1.16 GB
Error: Default native-compiler executable 'cl.exe' not found via environment variable PATH
Error: To prevent native-toolchain checking provide command-line option -H:-CheckToolchain
Error: Use -H:+ReportExceptionStackTraces to print stacktrace of underlying exception
Error: Image build request failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
我正在使用 Windows 10,graalvm-ce-java8-windows-amd64-20.2.0。我也在运行 Visual Studio …