You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Windows系统IntelliJ中Gluon插件编译失败求助

问题:GluonFX Maven插件编译时提示无法找到"cl"程序

我遇到的问题和另一篇Stack Overflow帖子基本一致,但按照帖子里的所有建议操作后还是无法解决。执行除gluonfx:run之外的任何命令时,都会出现以下错误:

"C:\Program Files\Amazon Corretto\jdk11.0.16_8\bin\java.exe" "-Dmaven.multiModuleProjectDirectory=C:\Java Projects\SPO related\Prototypes\SPO Gluon Prototype" "-Dmaven.home=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\lib\idea_rt.jar=56069:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.6.0.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2022.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2022.2 com.gluonhq:gluonfx-maven-plugin:1.0.16:compile
[INFO] Scanning for projects...
[INFO] 
[INFO] -------< com.spoapplication:spo-gluon-prototype >--------
[INFO] Building SPO Gluon Prototype 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] 
[INFO] >>> gluonfx-maven-plugin:1.0.16:compile (default-cli) > process-classes @ spo-gluon-prototype >>>
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ spo-gluon-prototype ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 13 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ spo-gluon-prototype ---
[INFO] Nothing to compile - all classes are up to date
[INFO] 
[INFO] <<< gluonfx-maven-plugin:1.0.16:compile (default-cli) < process-classes @ spo-gluon-prototype <<<
[INFO] 
[INFO] 
[INFO] --- gluonfx-maven-plugin:1.0.16:compile (default-cli) @ spo-gluon-prototype ---
[Thu Jan 12 20:52:44 IST 2023][INFO] ==================== COMPILE TASK ====================
             _______  ___      __   __  _______  __    _
            |       ||   |    |  | |  ||       ||  |  | |
            |    ___||   |    |  | |  ||   _   ||   |_| |
            |   | __ |   |    |  |_|  ||  | |  ||       |
            |   ||  ||   |___ |       ||  |_|  ||  _    |
            |   |_| ||       ||       ||       || | |   |
            |_______||_______||_______||_______||_|  |__|

    Access to the latest docs, tips and tricks and more info on
    how to get support? Register your usage of Gluon Substrate now at

    https://gluonhq.com/activate



[Thu Jan 12 20:52:45 IST 2023][INFO] We will now compile your code for x86_64-microsoft-windows. This may take some time.
java.io.IOException: Cannot run program "cl" (in directory "C:\Java Projects\SPO related\Prototypes\SPO Gluon Prototype\target\gluonfx\x86_64-windows\gvm\SPO Gluon Prototype"): CreateProcess error=2, The system cannot find the file specified
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1128)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1071)
    at com.gluonhq.substrate.util.ProcessRunner.setupProcess(ProcessRunner.java:378)
    at com.gluonhq.substrate.util.ProcessRunner.runProcess(ProcessRunner.java:236)
    at com.gluonhq.substrate.target.AbstractTargetConfiguration.compileAdditionalSources(AbstractTargetConfiguration.java:356)
    at com.gluonhq.substrate.target.AbstractTargetConfiguration.compile(AbstractTargetConfiguration.java:134)
    at com.gluonhq.substrate.SubstrateDispatcher.nativeCompile(SubstrateDispatcher.java:425)
    at com.gluonhq.NativeCompileMojo.execute(NativeCompileMojo.java:54)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:193)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:347)
    at org.codehaus.classworlds.Launcher.main(Launcher.java:47)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.base/java.lang.ProcessImpl.create(Native Method)
    at java.base/java.lang.ProcessImpl.<init>(ProcessImpl.java:492)
    at java.base/java.lang.ProcessImpl.start(ProcessImpl.java:153)
    at java.base/java.lang.ProcessBuilder.start(ProcessBuilder.java:1107)
    ... 30 more
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.639 s
[INFO] Finished at: 2023-01-12T20:52:45+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal com.gluonhq:gluonfx-maven-plugin:1.0.16:compile (default-cli) on project spo-gluon-prototype: Error: Cannot run program "cl" (in directory "C:\Java Projects\SPO related\Prototypes\SPO Gluon Prototype\target\gluonfx\x86_64-windows\gvm\SPO Gluon Prototype"): CreateProcess error=2, The system cannot find the file specified -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Process finished with exit code 1

我搞不懂为什么会出现“无法运行程序‘cl’”的错误,反复查阅了Gluon文档和各种在线解决方案都没用,大概率是VS 2022的安装或配置出了问题。我刚学编程几个月,希望有经验的开发者能帮忙解决。

内容的提问来源于stack exchange,提问作者MilckShake Beans

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.04 21:30:43