我必须运行两次启动应用程序。在第一次运行时,我的控制台报告一个错误:
| Running application...
Error occurred during initialization of VM
Could not reserve enough space for object heap
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command 'C:\Program Files\Java\jdk1.8.0_77\bin\java.exe'' finished with
non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)
但是在第二次运行中,它运行完美。谁能解释为什么?
最佳答案
运行JVM with -XX:MaxHeapSize=512m
(或任何大数字)(或简称-Xmx512m)
关于grails - Grails运行应用程序必须执行两次,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36687274/