A couple other items

  • If you're not on OSX, you'll probably have to edit classDetails.cfm and, on line 34, input the correct path to javap(.exe on Windows). cfexecute doesn't like to use the PATH variable... it expects the full path to the executable. So you'll have to change that.
  • You may need to create an instance of java.lang.Class at the top of a page when you're going to be calling getClass().getCanonicalName() against a ColdFusion object... the syntax is easy:
    <cfset oClass = createObject("java", "java.lang.Class")>
    You don't need to do anything else with it.
  • For many ColdFusion objects, just calling, for example, getMetaData(structNew()).getCanonicalName() is enough to get the classname because getMetaData() returns the same thing as getClass(). However, for some things (like queries) getMetaData() has specialized behavior and you'll need to use the getClass() method.
  • That's all I can think of for now... I hope you try it out and use it!

I have the zip file uploaded

Sorry for not uploading the file sooner. I missed that option when setting up the project and needed to make some changes to the project before I was ready to upload it anyway.

I sincerely hope you find the project useful!

Be sure that, if your ColdFusion install is not at the OSX default location (/Applications/ColdFusion8) that you edit index.cfm and input the right path. Also, if you're running a MultiServer or J2EE install, point the install location at your cfusion-war/WEB-INF folder. While that won't show all the JRun classes available (such as jrun.jar), it will give you all the ColdFusion-specific classes, which is more than enough anyway.

But more than anything, play, play, play! Mess around with ColdFusion objects, see what their Java type is, then look them up in TypeCast!

To find out the Java class name of a ColdFusion object, just do something like this:

<cfset myStruct = structNew()>
<cfoutput>myStruct.getClass().getCanonicalName()</cfoutput>

That'll tell you what you need to look up in TypeCast to see what methods and properties are available to you.

BlogCFC was created by Raymond Camden. This blog is running version 5.5.006. | Protected by Akismet | Blog with WordPress