Gluon 插件无法在 Window intellij 上编译

问题描述 投票:0回答:1

我知道这与 this 基本相同,但我遵循了答案中的所有建议,但它对我不起作用......当尝试做任何不是 - 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 或者我在那里安装了一些东西不正确。

我需要和有经验的人聊天,因为我没有,我在过去的几个月里学会了为高中班级的项目编写代码。

java windows intellij-idea gluon
1个回答
0
投票

MilckShake Beans 和 José Pereda。三天多来我一次又一次地看到你的对话,因为我也遇到了“无法运行程序'cl'”的错误。 在我放弃了一天来缓解我的头痛之后,我突然想通了 Gluon 文档的先决条件 windows 提示。 我使用的是 IntelliJ idea 2022、Java se 17.0.6 和 graalvm-svm-java17-windows-gluon-22.1.0.1-Final。 下图是我的解决方案,希望对您有所帮助。

© www.soinside.com 2019 - 2024. All rights reserved.