ColdFusion 10 shipped with Java version 6 (also referred to as JRE 1.6). And until recently, ColdFusion 9 and 10 users had to use Java 6 and could not upgrade to Java 7 (JRE 1.7). But Oracle recently announced that Java 6 is no longer being updated as of the end of February 2013, which is why it was so critical for us to release updates for ColdFusion 9.x and ColdFusion 10 to provide support for JRE 1.7.
Now that ColdFusion supports Java 7, you should indeed upgrade, and (as requested by several ColdFusion users) here are some instructions and pointers.
ColdFusion ships with a Java runtime, and that’s most likely what your ColdFusion server is using. To upgrade the JRE you actually leave the existing one intact (which makes it possible to easily restore to the prior state if something goes wrong). When you upgrade the Java runtime you install a new copy of Java, and then tell ColdFusion to use it instead of the one used previously.
Note: If you are running 32bit ColdFusion on Windows you’ll need the Java 7 JDK instead of the JRE, on all other platforms the JRE will suffice.
(Obviously, make sure you have backups, and you probably don’t want to make these changes during peak use time, this is definitely an off-peak type of upgrade).
Ok, here’s what you need to do …
- ColdFusion stores the path of its Java runtime in /cfusion/bin/jvm.config. Make a backup of this file! That way, if something goes wrong, you can simply stop ColdFusion, restore that file, restart ColdFusion, and you’ll be back up and running as if you’d have changed nothing at all.
- Download JRE 7 (or JDK 7) on to your ColdFusion server. Make sure you pick the right version for your OS. If you are using 32bit ColdFusion you must install the 32bit JRE, and if you are using 64bit ColdFusion you must install the 64bit JRE. (Pay attention to the 32bit versus 64bit decision, on a 64bit machine the page may default to 32bit if it detects you are using a 32bit web browser).
- Once you have downloaded JRE 1.7, install it on your server.
- Note the JRE 1.7 installation folder, you’ll need the full path to it.
- Log in to ColdFusion Administrator.
- Go to the Server Settings > Java and JVM page.
- Replace the Java Virtual Machine Path with the path to the newly installed JRE 1.7 (you can also click Browse Server to locate the folder), then click Submit Changes.
- You will be instructed to restart ColdFusion, so do that.
- Once ColdFusion has restarted, log back into the ColdFusion Administrator and go to Server Settings > Settings Summary. In the JVM Details section Java Version should indicate that you are running 1.7.0_15 (or newer).
That’s all there is to it! Obviously, you should test that your sites and apps are all working properly. And as noted previously, if something is not working, you can always stop ColdFusion, restore the jvm.config file, and then restart, to return ColdFusion back to its pre-upgraded state.