Question
Loading Resource from Java CLASSPATH break with MX 7.0.2 Enterprise
I have a couple ColdFusion applications which call Java
classes which load files (images, etc) found in the Java CLASSPATH.
This worked fine with ColdFusion 7.0 and 7.0.1 but fails unable to
find the files with ColdFusion MX 7.0.2 Enterprise. I have tried
these applications with the same result on both Windows and Unix
installations. Back out to version 7.0.1 and the applications work
again.
The problem only happens on the Enterprise edition. Upgrading the Developer edition on my PC to 7.0.2 did not cause my applications to break. However, every server running Enterprise edition upgraded to 7.0.2 is no longer able to use Java classes that call Class.class.getResourceAsStream(path);
Has anyone else encountered this or can suggest a good work around that would allow resource files to be laoded without hard coding paths since the application may run on multiple platforms or be moved around.
The following code segments output the contents of a text file. The text file is located in a directory included in the Java classpath. This code example works on any version of the developer edition of ColdFusion and version 7.0 and 7.0.1 of the Enterprise edition. It fails on Enterprise edition 7.0.2. I tested this on both Windows 2000 and Solaris 9 servers.
-----------------------------------
The problem only happens on the Enterprise edition. Upgrading the Developer edition on my PC to 7.0.2 did not cause my applications to break. However, every server running Enterprise edition upgraded to 7.0.2 is no longer able to use Java classes that call Class.class.getResourceAsStream(path);
Has anyone else encountered this or can suggest a good work around that would allow resource files to be laoded without hard coding paths since the application may run on multiple platforms or be moved around.
The following code segments output the contents of a text file. The text file is located in a directory included in the Java classpath. This code example works on any version of the developer edition of ColdFusion and version 7.0 and 7.0.1 of the Enterprise edition. It fails on Enterprise edition 7.0.2. I tested this on both Windows 2000 and Solaris 9 servers.
-----------------------------------