2017-03-14 48 views
0

「無法爲對象堆保留足夠的空間」當我在GRAILS運行命令3.2.7應用程序文件夾:Grails的3錯誤

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.

我在窗口10 x64與Java 1.8.0 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)

回答

0

事實證明,我的JAVA_HOME指着比我PAT環境變量java文件夾的路徑。 CHEK在一個CMD窗口與

ECHO %JAVA_HOME% 
ECHO %PATH%