gpt4 book ai didi

gradle - Grails 3错误 “Could not reserve enough space for object heap”

转载 作者:行者123 更新时间:2023-12-03 05:59:18 38 4
gpt4 key购买 nike

在我的GRAILS 3.2.7应用程序文件夹中运行命令时:

grailsw generate-all com.mycmp.myapp.*

我得到错误:

Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine.



我在使用Java 1.8.0 x64的Windows 10 x64上。
从网上看,应该添加gradle的JVM选项,但不知道应该在哪里完成。
尝试在gradle.properties中添加
org.gradle.jvmargs=-Xmx3072m -XX:MaxPermSize=524m

但是根本没有运气。有什么提示吗?

这是完整的错误消息:

| Resolving Dependencies. Please wait... | Error Error initializing classpath: Unable to start the daemon process. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm option is used. Please refer to the user guide chapter on the daemon at https://docs.gradle.org/3.4.1/userguide/gradle_daemon.html Please read the following process output to find out more: ----------------------- Error occurred during initialization of VM Could not reserve enough space for object heap Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. (Use --stacktrace to see the full trace)

最佳答案

原来,我的JAVA_HOME指向PAT环境变量中java文件夹以外的其他路径。
用cmd窗口检查

ECHO %JAVA_HOME%
ECHO %PATH%

关于gradle - Grails 3错误 “Could not reserve enough space for object heap”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42787435/

38 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com