Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

On Windows we can not make it totally portable (if you want the nice gui system tray and Windows Services entry) but we can make use of multiple instances. As such, I call this semi If you give up the gui, then it truly is portable.

Manually Setup JRE

The main advantage is here is there are no entries in your registry and no automatic updates of Java (which I find can cause problems).

...

For older of Java versions go to the Java Archives site.

Manually Setup Tomcat

Tomcat on Windows is also set up to run without requiring an installation. Some of this stuff is done by the Tomcat installer version, however, the installer can not handle multiple instances for vertical scaling. Investing the time in this article will allow you full control.

...

Unzip the folder to C:\opt. We will use the convention, C:\opt\apache\tomcat.0. The letter a designates an instance. As we scale up, you can have another instance called b, c and so forth.

Running Tomcat with a specific JRE version

Create a file called setenv.bat with the following contents using a plain text editor such as notepad,

...

That's it, Tomcat will actually run and start if you run it from the command line, however, Windows is not designed to run command line applications so see the next section.

Automatic Startup and Shutdown of Tomcat

In Windows, you probably want to make use of Windows Services to automatically startup, shutdown and even stop and start Tomcat.

...

Code Block
languagebash
cd C:\opt\tomcat.0\bin
tomcat6.exe //US//Tomcat6a --JavaHome=C:\opt\java
tomcat6.exe //US//Tomcat6a --Jvm=C:\opt\java\bin\client\jvm.dll

Tomcat Icon on System Tray

Finally, you can add Tomcat to the Windows System Tray.

...

Finally log out and log back in. You should now see the tomcat icon on the system tray.

Setup Tomcat Instance 1

Warning

Figure out how to link to headings here for the document.

To set up another instance of Tomcat, I would call it tomcat.1, simply copy the tomcat.0 directory, change the ports as outlined in Ubuntu 5.0 Portable Tomcat 6.x & Instances and repeat Automatic Startup and Shutdown of Tomcat and Tomcat Icon on System Tray with adjustment for the different name and directory.

References

http://tomcat.apache.org/tomcat-6.0-doc/windows-service-howto.html#Tomcat6w - Background on how to add to system try.