tags:

views:

484

answers:

4

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.

+1  A: 

I think your initial intuition is good on this one; bundling them all together in a single zip file, and then just providing a script to install them sounds like a good solution.

McWafflestix
+2  A: 

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.
kgiannakakis
Thanks again kgiannakakis. I am able to do that using HSQLDB, though i am still using Tomcat.
Rajat
+1  A: 

I am trying to do the same thing - tomcat startup.bat and catalina.bat scripts will find the JAVA_HOME and JRE_HOME variables. I edited the catalina.bat script to set the JRE_HOME variable to run from \jre (just copied over a jre folder) and that does it.

hsqldb and derby do not need a db install (however my project doesn't need a db - so don't have much to say about that).

i am thinking of jsmooth as an installer - need to check how I can change paths in a couple of configuration files without introducing perl into the mix to edit the files.

jetty is lighter than tomcat (unless you try tomcat embedded; i would get tomcat embedded to load, but wasn't picking up the search configuration files for some reason - didn't spend too much time on that).

amrish
It works, but its not very stable.The only problem is conflicting ports.If we use some tool to run before the install scripts and find out available ports and then configure tomcat with those ports, probably that problem would go away then.
Rajat
yes - you can use the startup batch (or perl) script to check available ports and use an available port to launch (using java -D"java.open.port"=XXX -jar <runjarfile.jar>)btw, i am having some issues embedded Tomcat 6.0.18 - (code works fine on Tomcat 5.5) any tips/links appreciated.
amrish
+1  A: 

Look for openbdjam and liferay, both of which I am testing today....

John Fisher