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 reserve enough space for object heap
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
To run a Play application: Create a new Run Configuration – From the main menu, select Run -> Edit Configurations. Click on the + to add a new configuration. From the list of configurations, choose “sbt Task”
To debug, start your application with activator -jvm-debug 9999 run and in Eclipse right-click on the project and select Debug As, Debug Configurations. In the Debug Configurations dialog, right-click on Remote Java Application and select New. Change Port to 9999 and click Apply.
Using the start command The easiest way to start an application in production mode is to use the start command from the Play console. This requires a Play installation on the server. When you run the start command, Play forks a new JVM and runs the default Netty HTTP server.
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" %*
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With