How to start Tomcat 7 from Windows command line in the same window?

12,415

Solution 1

I was able to run it in the same window using

catalina.bat run

enter image description here

Solution 2

catalina.bat run

This will do the trick. However the reason why it works lies within the file catalina.bat(for windows)/catalina.sh(for linux). Check how the action run and start blocks(:doRun and :doStart) are implemented. Both of them will start the tomcat; run in foreground and start in the background.

Share:
12,415
amphibient
Author by

amphibient

Software Engineer with table manners

Updated on June 17, 2022

Comments

  • amphibient
    amphibient almost 2 years

    When I run %TOMCAT_ROOT%\bin\startup.bat from a Windows 7 command line, it opens a new window with default command line window settings (I have them personalized). I would prefer to run it in the same command window in the same prompt and not forked off in a separate window.

    enter image description here

    As you can see, the inner Tomcat window in the picture above is smaller and has a smaller font. I would like to run the server in the bigger, parent window where I executed startup.bash.

    Essentially, I would like to run it on Windows the same way it would run as a console Linux application if I ran startup.sh.