views:

91

answers:

2

I developed a GWT Web Project but I also want to distribute this product as installer to my customers. I needs some programs that make web installer. This installer will be exe. And when the user clicks this exe, it will install tomcat, run tomcat and deploy project war file.

Have you any suggestions ?

A: 

Have you considered writing a simple installer program to do what you want and deploying it via Java webstart?

Sun provide the deployjava.js java script to detect and install Java, there are some Sun docs on it here

<html>
<head>
<script language="javascript" src="http://java.com/js/deployJava.js" type="text/javascript"></script>
    <script type="text/javascript">
        function doCheck(){
            if(!deployJava.versionCheck("1.6+")){
                alert("Apologies, you do not have the correct version of Java installed.  You will now be re-directed to Sun's appropriate Java installer.\n\nPlease install the Java Runtime Environment (JRE) version 1.6 or later and re-visit this page.\n\nThank you.")
                deployJava.installLatestJRE()
            }
            else{
                window.location = "<%=redirectJavaOkUrl%>"
            }
        }
    </script>
</head>
<body onload="doCheck();">
</body>
</html>
James B
But to run Java Webstart you also need to install JRE. I need a installer first controls whether Java installed or not. If not, installs JRE then continues the other works.
Firstthumb
Not neccessarily, you can set up the jnlp page so that it detects java and redirects the user to install it first...see my edit above
James B
+2  A: 

You could use NSIS to make a simple installer that does what you want.

Valentin Rocher
That's what I want. Thanks Bishiboosh
Firstthumb