Tomcat – Bundle tomcat/thesql and a webapp to use as a desktop application

tomcat

Is there some opensource solution that allows you to do that.I am working on a webapplication that i want to bundled as a desktop app.
I had seen some products that are web apps but are bundled as desktop apps.Is it possible to bundle JDK/tomcat/mysql and the webapp war file to ship as a desktop product.Could you please point to some resource that can help me do this.

One solution that i am thinking of is to bundled the entire stuff as a zip file and then provide an install.bat along with it.Please provide some more info regarding other ways to do this.Thanks for your help.

Best Solution

This is not so easy to do, because of the following:

  • It is not possible to install MySQL server with a simple zip file. You need a regular installer and user interaction to create the root user.
  • Even if you install Tomcat in a directory, you still need user interaction to set up JAVA_HOME or JRE_HOME and probably CATALINA_HOME variables.

I suggest the following for your situation:

  • Use HSQLB instead of MySQL. This is much easier to configure.
  • Use Jetty instead of Tomcat. Jetty is easier to embed than Tomcat. Whereas Tomcat will probably need an installer, Jetty is as simple as starting a Java application.
Related Question