Skip to main content
Inspiring
August 29, 2009
Answered

ColdFusion 8, Java, .NET

  • August 29, 2009
  • 5 replies
  • 3735 views

Okay, so CF8 can interact with Java and .Net but where can I find a list of the objects I can call from them? I know a few but can't find anywhere a comprehensive list. Anybody know?

This topic has been closed for replies.
Correct answer -__cfSearching__-

You probably will not find a list because it is quite extensive.  On the java side you can access any of the core java libraries. The exact list varies depending on which jvm you are using:

http://java.sun.com/javase/6/docs/api/

As well as any classes/jars that are within the CF classpath.  The classpath varies based on your installation type and environment. But it usually includes all of the jars in the installation "lib" directory:   ie c:\coldfusion8\lib\ . That directory contains the core CF jars as well as many third party libraries like iText, apache commons, etcetera. You will need to do a google search to find the documentation/api's for the individual jars. Most are pretty standard so they are not hard to find.  (A word of caution: The libraries are used by CF to provide core functionality. So moving or updating any of the core jar files could break CF)

I am not very familiar with .net side.  But a quick google search revealed the .NET framework installs the BCL library. So locally anything in the System namespace _should_ be available.
http://en.wikipedia.org/wiki/Base_Class_Library

Another reference mentioned that any assemblies present in GAC should also be accessible. This article shows how you can view the GAC
http://geekswithblogs.net/pavelka/archive/2006/05/05/WindowsExplorerAndTheGlobalAssemblyCache.aspx

HTH

5 replies

DinghusAuthor
Inspiring
September 2, 2009

Looks like I have some research to do but I'm thinking most of that stuff is covered under CF anyway. Matter-of-fact I have another application I'm in charge of but not the programmer for, that they use java to connect to the db for some reason. What a mess of code for something so simple in cf.

But I'm getting some wicked ideas. If you see a mushroom cloud from Hawai'i direction it is just me playing with coldfusion.

Inspiring
September 2, 2009

From: Dinghus <forums@adobe.com>

I went prowling through the ColdFusion folder but couldn't

find the available classes. Where can I find the available

classes in JRE and CF?

There is no one list. The various jars can contain hundreds of classes. (I am not aware of any documented list of all of the jars included either). You have to use the api's. I already posted the api link for the JRE jars/classes in my first or second response. For all of the other non-proprietary jars, you will have to look it up on online.

August 31, 2009

Hi Dinghus,


I'm a CF newbie but I have lot of experience with .NET.  I'm also new on this forum so please pardon any faux pas.


I wrote a tiny chunk of code that enumerates the methods available in a .NET assembly.  For example, if you wished to know what methods are found inside the System.IO.Directory, you could do this:

<cfset  objDotNet = createObject(".Net", "System.IO.Directory") >
<cfdump var = #objDotNet#>

I found a tool on the Web that will show which .NET assemblies are installed on your system.  I can't recall the URL for this free code, but if you Google

.NET Reflector 5.0

you should find it.

HTH,

JohnnyJ.

Inspiring
August 31, 2009

JohnnyJupiter you have perfect timing! I was just looking for something like that. Thanks.

Cheers

BKBK
Community Expert
Community Expert
August 29, 2009

There's no better place to begin than the livedocs on integrating Java with Coldfusion and using Coldfusion to call .NET assemblies.

Inspiring
August 29, 2009

pick a subject, there's tons & tons of java libs.

i18n? icu4j

super funky charting? jfreechart

GIS? mapserver mapscript, geoserver, JTS, postGIS

image processing? imagero, JAI

mythbuster science stuff? jScience

i could go on all day....

like cfsearching, i don't do much .net & can't suggest much but a little

googling should fix that.

DinghusAuthor
Inspiring
August 29, 2009

I must be searching for the wrong things. I haven't found anything which

is why I asked here. :^\

Inspiring
August 29, 2009

So are you looking for something particular like Paul asked .. or are you just getting your feet wet and would like to know what might be lurking beneath the waters ? ;-)

-__cfSearching__-Correct answer
Inspiring
August 29, 2009

You probably will not find a list because it is quite extensive.  On the java side you can access any of the core java libraries. The exact list varies depending on which jvm you are using:

http://java.sun.com/javase/6/docs/api/

As well as any classes/jars that are within the CF classpath.  The classpath varies based on your installation type and environment. But it usually includes all of the jars in the installation "lib" directory:   ie c:\coldfusion8\lib\ . That directory contains the core CF jars as well as many third party libraries like iText, apache commons, etcetera. You will need to do a google search to find the documentation/api's for the individual jars. Most are pretty standard so they are not hard to find.  (A word of caution: The libraries are used by CF to provide core functionality. So moving or updating any of the core jar files could break CF)

I am not very familiar with .net side.  But a quick google search revealed the .NET framework installs the BCL library. So locally anything in the System namespace _should_ be available.
http://en.wikipedia.org/wiki/Base_Class_Library

Another reference mentioned that any assemblies present in GAC should also be accessible. This article shows how you can view the GAC
http://geekswithblogs.net/pavelka/archive/2006/05/05/WindowsExplorerAndTheGlobalAssemblyCache.aspx

HTH