« It's Cool Tool Friday! | Main | No More Sony Clies In the US »
June 01, 2004
CFMX, OS X, and Java 1.4.2
Back in February, I posted some information on how to get ColdFusion to run on OS using Java 1.4.2. I made that post before realizing that, although CFMX does start up with the right version of Java, there is no way that I know of to add libraries to Java's (and therefore, ColdFusion's) classpath. Adding paths to the -cp or -classpath flags doesn't work because ColdFusion gets its classpath from the admin application. I thought that starting both CFMX and the admin application was fixing the problem until Sean Corfield pointed out that starting the admin application with CFMX forced CFMX to use Java 1.3 rather than 1.4.2. Oops.
Well, now I have a complete solution. The instructions I posted back in February are still valid, but now we also have a way to add libraries, as well. Rather than using the classpath to make additional libraries available to Java, put jar files in a directory specified by the java.ext.dirs system property. With my configuration, the directory "/Library/Java/Extensions" works well. For a list of valid directories, log into the ColdFusion administrator, click on the "System Information" link at the top, and scroll down to "Java Ext Dirs". Pick a directory in that list, and copy all your third-party jar files there. If you don't like to jar up your classes, you should also be able to put your classes (in their appropriate packages) right into an extension directory, as well.
The java.ext.dirs and java.class.path system properties cannot be changed dynamically after Java has started up, so don't bother going that route (I tried it just to be sure). At this point, I think using one of the Java extension directories is your best bet. There are still advantages to using a classpath on other platforms when you can since the classpath gives you the added advantage of sequencing your jars files (so that classes appearing earlier in your classpath take precedence over classes appearing later), but if that's all I have to give up in order to be able to fully run CFMX on OS X using the latest and greatest version of Java, that's perfectly fine with me.
Posted by cantrell at June 1, 2004 02:32 PM | References
Comments
Could you help me, i'm trying to use dreamweaver with coldfusion on MAC OS x it seem's that the database panel doesn't works.
Thanks for your help
Posted by: gilles BERTRAND at June 1, 2004 03:41 PM