12 java memory heap-memory java-7 playframework-2.0
我对我的游戏项目做了一些修改,当我尝试运行它时,我得到了错误.
>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.
Run Code Online (Sandbox Code Playgroud)
这是个常见的问题吗?我对游戏框架相当缺乏经验,但我之前已多次运行我的项目而没有遇到此错误.
编辑:有关Java版本的信息.
>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)
Run Code Online (Sandbox Code Playgroud)
Suj*_* PS 20
在Play framework 2.0.3中,<play framework install dir>\framework\build.bat您需要替换以下命令的命令行参数
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" %*
Run Code Online (Sandbox Code Playgroud)
成
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" %*
Run Code Online (Sandbox Code Playgroud)
它解决了我的问题.
有关更多信息,请参阅此文章.
| 归档时间: |
|
| 查看次数: |
6181 次 |
| 最近记录: |