Play Framework-无法为对象堆保留足够的空间 [英] Play Framework - can not reserve enough space for object heap
本文介绍了Play Framework-无法为对象堆保留足够的空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对我的游戏项目进行了一些修改,当我尝试运行它时,我得到了错误.
I made some modifications to my play project and when I try and run it I get errors.
>play run
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 occured. Program will exit.
这是常见问题吗?我对play框架缺乏经验,但是在没有遇到此错误的情况下,我已经多次运行了我的项目.
Is this a common problem? I am fairly inexperienced with the play framework but I have ran my project several times before without encountering this error.
有关Java版本的信息.
Information regarding java version.
>java -version
java version "1.7.0_11"
Java(TM) Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Client VM (build 23.6-b04, mixed mode, sharing)
推荐答案
在Play框架2.0.3中,<play framework install dir>\framework\build.bat
脚本需要替换下面命令的命令行参数
In Play framework 2.0.3, <play framework install dir>\framework\build.bat
script you need to replace the command line argument for the command below
java -Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=256M %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
进入
java -XX:+CMSClassUnloadingEnabled %DEBUG_PARAM% -Dfile.encoding=UTF8 -Dplay.version="%PLAY_VERSION%" -Dsbt.ivy.home="%~dp0..\repository" -Dplay.home="%~dp0." -Dsbt.boot.properties="file:///%p%sbt/sbt.boot.properties" -jar "%~dp0sbt\sbt-launch.jar" %*
它解决了我的问题.
有关更多信息,请参考这篇文章.
For more, refer to this post .
这篇关于Play Framework-无法为对象堆保留足够的空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文