What if I did a cfdirectory and simply looked for the seefusion.jar
file?  That would probably work, but I don't know if that is bad form
from a programming perspective.

~Brad

-----Original Message-----
From: Dawson, Michael [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 1:36 PM
To: CF-Talk
Subject: RE: check for class before creation

In this case, I would either use try/catch, or have a "settings" file,
on each web server, that is checked before you try to create that
object.

The code would be the same, but the settings file would have a
true/false for the existence of the java class, for that particular
server. 

-----Original Message-----
From: Brad Wood [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 18, 2006 1:19 PM
To: CF-Talk
Subject: check for class before creation

Is there a way to check for existence of a Java class BEFORE I try to
create an instance of it with createObject()?

 

I don't want to try/catch it, but I can if I must.

 

In case you are wondering, we have multiple production servers, and
SeeFusion is only installed on one of them.  As a practice we always
keep the code bases consistent across all the servers, but the following
code of course would error on the servers where SeeFusion is not
installed:

 

<cfset seefusion = createObject("java", "com.seefusion.SeeFusion")>

<cfset seefusion.setRequestName(cgi.script_name & "?" & form_vars)>

 

Thanks!

 

~Brad







~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246945
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to