How to prevent auto-closing of Tomcat on starting from Jenkins job?

I am trying to start Tomcat in my Jenkins job on a slave machine.
I start Jenkins slave manually by opening slave-agent.jnlp

This is what I tried in Execute Windows Batch Command:

  • Jenkins and return code from windows batch
  • How can I retrieve environment variables(Jenkins) in java
  • Execute windows batch command from Jenkins fails but runs fine in cmd.exe
  • How to input password to git pull command?
  • Post-commit hook that performs an action only if commit affects the specific path
  • Start Tomcat on Console from Jenkins
  • call C:\tomcat\bin\startup.bat
    

    Tomcat starts on running the build and the build is marked successful but then Tomcat auto closes after few seconds.

  • Staged deployment of snapshot artifacts with Maven and Jenkins
  • Findbugs Bug SE_BAD_FIELD on boolean field
  • When selenium test runs by Jenkins and nUnit, the browser doesn't come up however there are valid results
  • PHP build for Jenkins failing with 'Cannot run program “phploc”'
  • Not getting Docker to run from within Jenkins
  • Validate certificate and provisioning profile
  • One Solution collect form web for “How to prevent auto-closing of Tomcat on starting from Jenkins job?”

    This is Jenkins Process Tree Killer in action. This is by design. You can either disable it globally for the whole Jenkins (not recommended) by starting Jenkins with extra parameter
    -Dhudson.util.ProcessTree.disable=true.

    For Windows environment, you can use the at command to schedule start of Tomcat (with 1 sec delay).

    Git Baby is a git and github fan, let's start git clone.