Play Framework - can not reserve enough space for object heap

前端 未结 1 1218
被撕碎了的回忆
被撕碎了的回忆 2021-02-08 00:00

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 e         


        
1条回答
  •  慢半拍i
    慢半拍i (楼主)
    2021-02-08 00:47

    In Play framework 2.0.3, \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" %*
    

    into

    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" %*
    

    It solved my problem.

    For more, refer to this post .

    0 讨论(0)
提交回复
热议问题