Search code examples
javaeclipsetomcatspring-tool-suitejavaw

When launching Spring app (STS) with embedded Tomcat, both java.exe and javaw.exe processes are created on the same port


As the title says - when launching Spring app (STS) with embedded Tomcat, both java.exe and javaw.exe processes are created on the same port.

That means I have troubles with busy port, even when using the Relaunch option (which typically shuts Tomcat down and then restarts it). Indeed, relaunching does stop one of the two processes but then I get an error stating that the port must be busy. Killing the remaining one does solve the issue but I life is too short to both develop in Java AND kill the process manually.

Is there a convenient way to overcome this? I see that is STS (and Eclipse too, of course) there's a way to specify project specific JRE but I'm unsure on how to proceed.

Note: I have both 32- and 64-bit java8 instances installed.


Solution

  • Try running it as a java application (ie, just run main).

    It sounds like you are deploying it on Tomcat, while at the same time there is an embedded Tomcat being started... :)