pf » Dynamic Java Class Loading with ColdFusion
August 18, 2005
Dynamic Java Class Loading with ColdFusion

Doug Hughes has posted a very clever technique for allowing you to run Java classes without adding them to your classpath. This means that people who build ColdFusion apps that include java classes can make them super easy to install.
Related Entries
- Serializing CFC's in ColdFusion 8 - August 6, 2007
- Finding the Last Modified Date on a File - January 11, 2007
- ColdFusion on the TIOBE index - March 18, 2006
- Null Java References in CF 6 vs 7 - January 10, 2006
- DNS Query with ColdFusion - October 27, 2005
Trackback Address: 447/13033FE7215790CE9FA9D4BD75140270
Comments
On 08/18/2005 at 8:38:41 PM MDT Barney wrote:
1
It's at least as simple (I'd say simpler) to include the compiled classes on the filesystem in the same directory as your CF files, and use a URLClassLoader to load them. Still no need for access to the classpath, it's just as easy to install the app, and no messing with having to encode your classes and all that rot (which makes building a lot easier).
On 08/20/2005 at 8:01:46 PM MDT Doug Hughes wrote:
2
Barney, I don't disagree with you at all. But, consider my business: selling easy-to-use-but-still-somehow-powerful components to developers of all skill levels. I know, without a doubt, that you and Pete could easily handle moving some class files arround. I can't say that for everyone else. (I speak from experiance.) Besides, there's the "how'd they do that?!?" effect. Oh, and if you implement all your code in Java, but create a CF facade and imbed your java classes inside that CFC, you can prevent decompiling... sorta. :)
Anyhow, I'm not saying we should use it. I'm just saying it works.
Doug
- CFSCRIPT Cheatsheet
- 3 New Image Effects for ColdFusion 8
- Googlebot to Submit Web Forms
- ColdFusion 8 Update 1 Fixes some Image Processing Quirks
- 10 Most Useful Image Functions in ColdFusion 8
- Speaking at NYC CFUG This Week
- Adobe AIR Tutorial for HTML / JavaScript Developers
- INFORMATION_SCHEMA Support in MySQL, PostgreSQL
Subscribe to my RSS Feed:
RSS
RSS
add to del.icio.us
Pete Freitag is a software engineer, and web developer located in









