December 2013

Gavin Pickin

Techie Gotcha - CFML Server - Wipe the dust off your JRE and Trade it in for a New One

CFML Server, Techie Gotchas

Everyone is all excited about ColdFusion 11 coming out soon, the public beta must be getting very very close to being available now. CF Summit raved about all the cool new things that Adobe is aiming to put into ColdFusion 12 (here is Adam Cameron's blog Entry where Micha from Railo discusses some of Coldfusion 12's new features ), most people are using ColdFusion 10, or migrating to 10 from 9... right?

So what am I doing? I'm upgrading a box still running ColdFusion 8. Yup, its EOL… well, Jrun which is it running on is EOL, and Adobe no longer support it with Security Updates etc, but I have to support it still… if only for just a little bit longer. So, I decided I should probably update the JVM, its been a while, and looking at some blog entries, there are a lot of good reasons to update JVMs, so thats what I am doing... and as usual, I have a couple of lessons to share, so you don't make the mistakes I do. 

The JVM can be a little scary, because if you get a setting wrong, ColdFusion won't start, and you have to figure out how to get to the jvm settings, because you normally change those settings in the ColdFusion administrator. Don't worry, its not that scary, and this article and a few links I included for more information, will make sure if you have to upgrade your JVM, which you probably need to do, or should do, it will be a pretty easy task.

Adobe has one article here, letting you know what Java updates are supported, here, at the time of writing, 1.6.0_35 was current, but any 1.6.0_n update would be supported.

Charlie Arehart has a good one here, talking about some of the serious bugs not fixed if you are running anything under Java 1.6.0_24.

If you are like me and you just browse over Charlie's post, there might be a couple of things you miss… so I'll highlight those Gotchas here, so you don't do the same thing as me. I recommend you read Charlie's post in full actually, some interesting stuff, but finish reading mine first, ok.

This entry has some good information… but the key thing to see here, even though you point the Java Home directory in the jvm.config file to your JRE folder… you cannot download the JRE version.

Why you ask? ColdFusion requires the hotspot server files, and that is not included in the JRE. Ok… so reading this, you go to, find the 1.6 JDK version you want, JDK 45 is the latest and greatest, and CF8, is not certied for Java 7, since CF 8 EOL'ed before Java 7 was verified for any version of CF. You accept the terms, and go to download the file, and up POPS Oracles single sign on login screen. 

I guess you don't need to create an account and sign in to get Java 7, or even 8, yes, Java7u45 is out, and Java8 is out too. Anyways, since Java6 is considered old, you'll have to sign up an account, and sign in.

Once you download the file, you can install the JDK.
You can change the install directory for both the JDK and the JRE.

Once it installs, you go to CF Administrator, and paste in the new path, to the JRE right?

Wrong… that is still the normal JRE.

Inside the installation folder of the JDK, there is a JRE as well, and that is the one with the server folder in the bin that you need for Coldfusion.
So you update the JVM setting to the path of the JDK/JRE folder, and now you are good to go.

What if you made a mistake the first time, and chose the wrong JRE location, like me?

Well, you can go and restore the backup file. jvm.backup to jvm.config, which in a single server is in 

Adobe's article I mentioned earlier has the location of the jvm.config file for CF9 and Mutli Server Setups here.

Or you can update the jvm.config file directly.

Note… you can use forward slashes, in your paths, but on windows, you can use forward or back. If you paste backslashes into the java-home line like the following, it will error


You have to use forward slashes like 


Or escape the backslashes, like this


Note, if you use the CF Administrator, and paste in C:\ColdFusion8\runtime\jre it will escape them for you.

Ok, again, nothing too complicated here, but I installed Java 1.6.0_45 today, and it worked a treat.
Just make sure you don't make these Rookie mistakes, especially in production, as you might be frantically trying to find the runtime/bin folder to get to your jvm.config file to make the changes to get it back up and running while you figure out what you did wrong.

UPDATE: After I posted this, I forgot about the Java settings that might get lost when you upgrade, most significantly, the Java Certificate Keystore. Read this follow up. Techie Gotcha - CFML Server - Follow up to Upgrading your Java JRE / JVM - Do Not Forget

You think this was fun, wait until I tell you about the JNDI issues I had with the wsconfig installing CF9 on a windows machine for a developer. I've installed it literally 20-30 times, maybe more, and never come across this, until this week. Fun times.

Happy Holidays, thanks for reading,


Blog Search