title: Java web application not binding with Heroku $PORT
body: <p>I have made a Java web application and trying to host it on Heroku with a <code>Dockerfile</code>, <code>CMD</code> as :</p>
  <pre><code>CMD [&quot;java&quot;, &quot;-Dserver.port=$PORT&quot;, &quot;-jar&quot;, &quot;/usr/local/lib/backend.jar&quot;, &quot;--server.port=$PORT&quot;]
  </code></pre>
  <p>And getting the logs as follows:</p>
  <pre><code>2022-05-06T06:53:33.599532+00:00 heroku[web.1]: Starting process with command `java -Dserver.port\=\27061 -jar /usr/local/lib/backend.jar --server.port\=\27061`
  2022-05-06T06:53:35.445811+00:00 app[web.1]: 199 [main] INFO org.reflections.Reflections - Reflections took 179 ms to scan 1 urls, producing 4 keys and 22 values
  2022-05-06T06:53:41.324114+00:00 app[web.1]: 6078 [main] INFO org.reflections.Reflections - Reflections took 58 ms to scan 1 urls, producing 3 keys and 16 values
  2022-05-06T06:53:41.544513+00:00 app[web.1]: May 06, 2022 6:53:41 AM org.javawebstack.httpserver.HTTPServer start
  2022-05-06T06:53:41.544514+00:00 app[web.1]: INFO: HTTP-Server started on port 1337
  </code></pre>
  <p>I am not getting able to understand that my argument is providing <code>--server.port=27061</code> but still the HTTP server is starting on port 1337.</p>
  <p>I have already seen all the related available answers on Stack Overflow but none works for me.</p>
  <p>I am using <code>javawebstack httpserver</code></p>