Saturday, January 26, 2013

Calling Java 7 from Cold Fusion

I tried calling Java 7 objects from Cold Fusion10  today and I got nothing ...  Literally, nothing.  At the CFOBJECT tag, the script would just die.  No error message.  Nothing in the log files.  Just nothing.

I made a Java 7 object, one class, one method, nothing special...Same results.  Then I converted that project (one class) to JDK 6, and poof!  The same object compiled using JDK6 works fine! 

http://blogs.coldfusion.com/post.cfm/java-7-support-for-coldfusion

The above article states that CF 9 and 10 will support Java 7 through updates by February 2013 ... we'll we're getting close.  I just downloaded all the updates and ...

Fail!

Even with all updates applied, the script just dies when i try to call Java 7 objects from CF 10.  So now I've got all of this code written for JDK7, and I need to call it from CF10 ... What to do ...  Looks like I might be converting a lot of code written for JDK7 to work with JDK6, which sucks, because I like try-with-resources, and I like the diamond operator ... a lot :(