How can I change the default port used by the play framework in development mode when issueing the "run" command on the play console.
This is for playframework 2.0 beta.
Using the http.port configuration parameter either on the command line or in the application.conf seems to have no effect:
C:\dev\prototype\activiti-preso>play run --http.port=8080
[info] Loading project definition from C:\dev\prototype\activiti-preso\project
[info] Set current project to activiti-preso (in build file:/C:/dev/prototype/activiti-preso/)
Windows, really? Ok, disabling colors.
--- (Running the application from SBT, auto-reloading is enabled) ---
[error] org.jboss.netty.channel.ChannelException: Failed to bind to: 0.0.0.0/0.0.0.0:9000
[error] Use 'last' for the full log.
Best Answer
Play 2.x
Play 2.x - Dev Mode
For browser-reload mode:
For continuous-reload mode:
Play 2.x - Debug Mode
To run in debug mode with the http listener on port
8080
, run:Play 2.x - Prod Mode
Start in Prod mode:
Play 2.x - Staged Distribution
Create a staged distribution:
For Play 2.0.x and 2.1.x use the
target/start
script (Unix Only):For Play 2.2.x & 2.3.x use the appropriate start script in the
target/universal/stage/bin
directory:With Play 2.2.x & 2.3.x on Windows:
Play 2.x - Zip Distribution
To create a zip distribution:
For Play 2.0.x and 2.1.x use the
start
script (Unix Only) in the extracted zip:For Play 2.2.x use the appropriate script in the
[appname]-[version]/bin
directory:With Play 2.2.x on Windows:
Play 1.x
Change the
http.port
value in theconf/application.conf
file or pass it command line: