Maro
Maro

Reputation: 4155

Application Installer with Tomcat

I have a simple Java web application using HSQLDB embedded database. The application is packaged as a simple war file. part of the requirement is to develop an application installer, that will:

  1. Installs TOMCAT
  2. resolves port conflicts (if any)
  3. Deploys the war
  4. Creates a shortcut that starts the service and launch the browser

I will also need to do this for both MAC and Windows, Any Ideas on how i can achieve this?

Upvotes: 2

Views: 291

Answers (1)

Kronos
Kronos

Reputation: 36

The problem looks very simple to me. Solution:

  1. Do not rely on the target system having/not having JRE. Have a compatible JRE packaged with your application installer and forcefully install it (I've had compatibility issues).

  2. In the installer, you should have the installer for the database application (if required), the JRE folder and the tomcat folder with the war file already in place. Just zip/tar these things together and unzip/untar them during installation.

  3. Set the CATALINA_HOME variable to your tomcat folder as a system variable.

  4. Set the JRE_HOME and append PATH with your JRE folder and JRE/bin folder respectively in the same session in which you start tomcat. This forces tomcat to pick your JRE version and does not disturb any other application running on the JVM.

Upvotes: 2

Related Questions