September 16, 2014
How to change/upgrade JDK version of ColdFusion server
Comments
(19)
September 16, 2014
How to change/upgrade JDK version of ColdFusion server
Staff 17 posts
Followers: 1 people
(19)

This post is from my personal blog nimitsharma.wordpress.com

 

In this post, we discuss how to upgrade the latest minor version of JDK(Java Development Kit) of the ColdFusion server. ColdFusion can run only on top of JDK or JRE with Server VM. Oracle also started providing separate download link for JRE and Server JRE. ColdFusion only works with JDK or Server JRE and not with Client JRE [For more details refer article].

 
There are two ways to change the JDK or Server JRE of the ColdFusion server:
 
  1. Using ColdFusion administrator console.
  2. By changing the JDK or Server JRE path from the jvm.config file.
 
1. Using ColdFusion administrator console.
 
  • Download the latest minor version of the supported JDK or Server JRE.
  • Install the JDK or Server JRE.
  • Navigate to ColdFusion Administrator > Server Settings > Java and JVM section.
  • Browse the path to the JDK or Server JRE from the “Java Virtual Machine Path” textbox which you intended to use with ColdFusion.
  • Click “Submit Changes”.
  • Restart the ColdFusion Application service.
 
2. By changing the JDK or Server JRE path from the jvm.config file

  • Download the latest minor version of the supported JDK or Server JRE.
  • Install the JDK or Server JRE.
  • Open jvm.config file located at <cf_install_root>cfusionbin.
  • Change the value of java.home to the JDK or Server JRE path. [For example: C:Program FilesJavajdk1.7.0_25jre or C:/Program Files/Java/jdk1.7.0_25/jre]
  • Save the changes to the jvm.config file.
  • Restart the ColdFusion Application service.
Important Note:
  • It is not recommended to change the JDK version on the production servers without any prior testing in the staging environment.
  • Any SSL certificates added to the previous JDK will also need to be re-added to the new JDK(cacerts) file.
19 Comments
2017-01-30 16:11:00
2017-01-30 16:11:00

Also – like Joe – needed for update to TLS 1.2. Payment gateway webservices I use stopped supporting TLS 1.0 and 1.1. Timely reminder to keep on top of updates in future. Not sure why it isn’t part of the CF Server update process. But no trouble updating manually when you have the steps laid out as above. Thanks a lot for the info.

Like
2016-10-18 10:10:10
2016-10-18 10:10:10

Additional comment. The reason we needed to upgrade to JRE 1.8 is that the JRE 1.6 in our ColdFusion 10 did not support TLS 1.1 and TLS 1.2, only TLS 1.0. JRE 1.8 does and we need them to work with another program that now requires either TLS 1.1 or TLS 1.2. We have all the patches to ColdFusion 10 so far and now it works using the method I described above. If there is something safer about installing Java 1.8 manually and not using the ColdFusion Administrator, but editing the java.config path manually to change the JRE location, we would like to know that. Thanks.

Like
2016-10-18 09:38:30
2016-10-18 09:38:30

I “upgraded” my ColdFusion Java by pointing it to the version used by the Windows server.

In Windows:
1. Click Windows Start button
2. Choose Programs : Java : Configure Java
3. Click on the Advanced tab
4. Near the bottom, check the checkboxes for TLS 1.1 and TLS 1.2

Both were already checked.
Find the path for the JRE folder:
Click on the Java Tab
Click the View Button
On the User Tab, you should see Path
In my case it is:
C:Program FilesJavajre1.8.0_91

Navigate to ColdFusion Administrator > Server Settings > Java and JVM section.
Browse the path to the JDK or Server JRE from the “Java Virtual Machine Path” textbox which you intended to use with ColdFusion. In my case it is C:Program FilesJavajre1.8.0_91
Click “Submit Changes”.
Restart the ColdFusion Application service.

I have been advised that I should have updated ColdFusion’s Java and not have used the one on the server. Also, I should modify the jvm.config manually and not through the ColdFusion Administrator. They referenced this blog as the source of their information. Is that correct? The way I did it is working.

Like
2016-08-21 20:07:25
2016-08-21 20:07:25

CF9.02+ worked with 1.7.15 SDK version Win 2003. Thanks!

Like
2016-06-08 06:43:57
2016-06-08 06:43:57

Running CF11 Update 7 with JDK 8 Update 77 with no issues on a Windows Server 2008R2 system. As soon as I apply CF11 Update 8 with JDK Update 92 I receive the following error: HTTP Status 500 – coldfusion.server.ServiceFactory$ServiceNotAvailable Exception: The Runtime service is not available. The only recourse I have found is to reinstall CF11, apply CF11 Update 8 and then apply JDK 8 Update 92. Any help would be appreciated.

Like
2016-02-10 07:07:26
2016-02-10 07:07:26

When we upgrade Java on our web server, we go into the Administrator and point to the new location of the JRE. We then restart the service and remove the older version of JRE.

Is there any reason why this has to be a manual process for each release of Java? It seems that ColdFusion should be set up to somehow recognize the current version and we wouldn’t have to make the change manually.

Like
2016-02-02 10:03:33
2016-02-02 10:03:33

Oracle shows a JDK 32bit and 64bit version. What bit version should be used on a 64Bit OS?

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

Like
2015-11-27 12:59:37
2015-11-27 12:59:37

If you are trying to call web services in CF 11 (and maybe 10 but check that yourself), CF expects the web service or any CFHTTP call to use the WebSocket Service and port 8577 in a standard setup. This is because the WebSocket Services have been optimized for web services and CFHTTP also uses WebService Sockets. I run CF 11 on my IIS server and port 8577 is blocked by a firewall. When I tried to connect, it sends back “I/O Exception: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target” for CFHTTP and web services. It would seem like it requires adding custom certificates to the CACERT for JRE but that is not the solution for me. There is a simple fix to get this running with IIS (at least IIS) if you do not want to unblock the WebSocket Service and you don’t need that performance to run natively. All you have to do is go in to the CF Admin dashboard and change the WebSocket Service to “Use Proxy”. This will send all calls to the CF WebSocket Service or CFHTTP through IIS as a proxy. Restart the CF Application Server service and it should work just fine. If these directions are not perfect I apologize but it will lead you to get it working. http://www.adobe.com/devnet/coldfusion/articles/using-websocket.html

Like
2015-06-17 20:08:48
2015-06-17 20:08:48

Also, can you explain what “Download the latest minor version of the supported JDK or Server JRE.” means? The download options on the Oracle site are confusing to many of us.

Like
2015-06-17 20:07:39
2015-06-17 20:07:39

Would it possible to also add to this great post about how to actually figure out which you need? For example, “How to figure out if you need the JDK or the JRE”.

Like
2015-01-19 10:10:25
2015-01-19 10:10:25

Would you please edit this post to include the additional step needed for CF10 & CF11 on Java 8? https://coldfusion.adobe.com/post.cfm/coldfusion-10-and-11-support-with-java-8

Like
2014-09-22 22:06:19
2014-09-22 22:06:19

Thanks Charlie for your feedback. I am planning to include one or two other scenarios as well. I will also make required changes as suggested.

Like
2014-09-22 18:38:05
2014-09-22 18:38:05

Thanks for sharing, Nimit. Given the fact that the JVM is often updating, and the lockdown guide does recommend people updating the JVM CF uses for security reasons, this is always a good topic to repeat for folks.

That said, there are a few more tips I’d add on top of what others have shared here (and I’ll let you decide of course, Nimit, whether you may choose to add any of these to the blog entry itself as you have some others.)

First, it seems worth mentioning to readers that if you choose to make the edit in the CF Admin, you take a significant risk in that if you point to the wrong location and CF can’t start, then you won’t be able to access the Admin to correct the mistake. I always recommend that folks edit the jvm.config instead to make this change.

Second, you may want to offer the example path (from the jvm.config steps) and repeat it in the CF admin steps, to help folks point to the correct location. (I see many people make the mistake of pointing to the location where the new JVM was installed, not its JRE subdirectory.)

Third, it’s worth clarifying for those on Windows that if they DO edit the JVM config, they must not only point to the correct location but use the path separators (like you have) , as opposed to just dropping in the Windows path which would use / by default.

These, along with Dave’s comment about SSL certs and Carl’s comment about the MSVCR dll are among the things that often confuse folks in trying to do this JVM update.

There may be another couple of things that come to mind, or that others may observe here over time.

Once you understand and watch out for these few things, changing the JVM is really pretty easy (less then 5 mins start to finish).

Like
2014-09-18 11:19:07
2014-09-18 11:19:07

Yes, it applies to all the supported versions of ColdFusion. You can upgrade to any minor version of JDK, as long as the major version is supported. As of now, Java 8 is not supported but the process of upgrading the JDK will remain the same.

msvcr100.dll should only be replaced, if ColdFusion bin directory does not have the version of msvcr(NNN).dll required by the JDK being used with the ColdFusion.

Like
2014-09-16 18:17:12
2014-09-16 18:17:12

Any thoughts on replacing the msvcr100.dll file in ColdFusion11cfusionbin with the one from Program FilesJavajdk1.7.0_25bin ?

ColdFusion10cfusionbin for CF10
ColdFusion9runtimebin for CF9

Like
2014-09-16 18:01:01
2014-09-16 18:01:01

Java 8 has been release since March 2014 and is currently 1.8.0_20. Is Java 8 supported similarly as these instructions?

Like
2014-09-16 17:56:10
2014-09-16 17:56:10

Does this apply to all current Adobe supported ColdFusion’s 9, 10 and 11 ?

Like
2014-09-16 04:38:23
2014-09-16 04:38:23

@Dave: Good point. I have added the note.

Like
2014-09-16 04:28:34
2014-09-16 04:28:34

Its probably worth mentioning that any custom SSL certificates added to the previous JDK will also need to be re-added to the new JDK (cacerts) file

Like
Add Comment