java - loading tomcat using code -


im using tomcat 7 , , im trying nice. want have little swing program operate current project (a site)

i wish have in swing application button run server , shut server , such.

i know there option of running start application dont want it. want have option click swing button , load it.

for , need run server code.

is there way load tomcat server via code?

a quick solution may using runtime can -

runtime.getruntime().exec("startup.bat");

similarly, stop -

runtime.getruntime().exec("shutdown.bat"); 

assuming both batch files exist in tomcat bin directory.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -