title: Play Framework 2 Stage Task on Windows, "The input line is too long"
body: <p>I'm trying to Play 2 application on Windows Server Server 2012 using the "<a href="http://www.playframework.com/documentation/2.2.x/Production">stage</a>" task, with the goal of wrapping this up in a service so the application will automatically run when the server gets restarted. However, when running the app I get the following message:</p>
  
  <pre><code>The input line is too long.
  The syntax of the command is incorrect.
  </code></pre>
  
  <p>This is because Windows has a <a href="http://support.microsoft.com/kb/830473">limit of around 8000</a> characters for command line instructions but it seems like the Play stage command is exceeding this by passing the classpath as an argument. </p>
  
  <p>Copying the "stage" folder to c:\ <em>might</em> fix the issue (as it'll reduce the size of the classpath) but I was hoping there would be a more elegant solution. </p>
  
  <p>Has anyone found a way around this? Alternatively, do people have any suggestions for running a Play application on Windows so that it will automatically run when the server is restarted.</p>
  
  <p>Thanks.</p>