title: Set port number when starting apache tomcat- Window Services through command line
body: <p>I want to start tomcat service through cmd line on my windows machine. I have Tomcat7.exe in tomcat bin folder. I know that, to start command I am suppose to run:</p>
  
  <pre><code>c:\..\bin&gt;tomcat7.exe start
  </code></pre>
  
  <p>Can I set port number before start, like in</p>
  
  <pre><code>set "JAVA_OPTS=-Dport.shutdown=8005 -Dport.http=8080" bin\startup.bat
  </code></pre>
  
  <p>Ref: <a href="https://stackoverflow.com/questions/15555838/how-to-pass-tomcat-port-number-on-command-line">How to pass tomcat port number on command line?</a>
  But I dont have batch file.</p>
  
  <p>How can I set port before i start service? Can you help me on this?</p>