Upgrading the JRE used in Railo

When you install Railo, the default JRE that comes with it is 1.6.0_01. So you might want to upgrade it some when.

By default you will find a /JRE folder in the Railo installation directory (assuming you are have installed the Resin version). Just by replacing this directory with a more up to date version and of course stopping and starting Resin inbetween helps already a lot. If you take a closer look to the service that calls Railo you will see the following call:

"...\httpd.exe" -service -conf conf/resin.conf -java_home jre/ -java_exe jre/bin/java
There might be some other options but these are the important ones. So here the path to the Java Runtime Environment is defined as well as the path to the Java executable. So if you are installing another JRE somewhere else, you can execute the following commands under windows (assuming you have installed Java 1.6.0_14 under c:\Program Files\Java\jdk1.6.0_14\):
c:
cd "program files\railo"
net stop "Railo 3.1 Open Source Server"
httpd -remove-as "Railo 3.1 Open Source Server" // or whatever name your service has
// now re-install the service
// this all of course in one single line!
// Don't forget the "quotes" if you have spaces in one of the used directories
httpd -install-as "Railo 3.1 Open Source Server" -conf conf/resin.conf
-java_home "c:\Program Files\Java\jdk1.6.0_14\jre\"
-java_exe "c:\Program Files\Java\jdk1.6.0_14\jre\bin\java"
net start "Railo 3.1 Open Source Server"
Then Railo runs with the latest JRE.

When you install the same under *nix, you need to edit the /bin/httpd.sh or resin.sh file and edit the following lines accordingly:
#! /bin/sh
#
... lots of comments
#
java=java < - - - this is the line to edit. By default it takes the java version found in the system path
...
Just enter the path to the installed JRE and restart the Railo deamon. Hope this helps you to upgrade your Java JRE's.

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)
BlogCFC was created by Raymond Camden. This blog is running version 5.9.1.002. Contact Blog Owner