Play Framework Run Application Issue

前端 未结 3 1228
不思量自难忘°
不思量自难忘° 2021-02-02 14:06

I am getting the following error whenever i am trying to run a new Web Application created using Play.

Error occurred during initialization of VM
Could not reser         


        
相关标签:
3条回答
  • 2021-02-02 14:45

    in 2.3 Play framework :

        GO to : 
    

    C://Play2.3/framework/build.bat and open this file and make these changes. Replace this line with below line.

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

    then type this command on command promt:

           C:\Users\k.ashish\Downloads\play-2.2.3\play-2.2.3\yourapp>play
    
            C:\Users\k.ashish\Downloads\play-2.2.3\play-2.2.3\yourapp>run
    

    If you are not able to execute this command then set the play2.3 framework path in Environment variable in windows like java path .

    0 讨论(0)
  • 2021-02-02 14:47

    Just downloaded and unzipped 2.2.1 on my Windows 8 computer.

    Followed the documentation at Play Framework website, and ended up having the same issue as you. Adjusting the various parameters in the build file didn't do anything, but the:

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

    ... solved the problem. I don't know where other people found this solution, but there's no mentioning of this solution on the Play Framework website. In fact, there's nothing to suggest that anything could go wrong. After all, it's just a file you need to unzip.

    It's running now, however it's a little hard to trust a framework that screws up that early on. Seems the authors don't test on anything but Linux.

    0 讨论(0)
  • 2021-02-02 14:50

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

    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" %*
    
    0 讨论(0)
提交回复
热议问题