Accessibility
Icon or Spacer
   

ColdFusion 4.5.1: CFX, CFOBJECT and Java on Linux

ColdFusion will not work with my CFX Java tag and/or my CFOBJECT tag. How do I configure ColdFusion so that Java objects will work with it on Linux?

In order to get Java capability through ColdFusion for Linux using the CFOBJECT tag type=JAVA and CFX Java custom tags, the following components must be installed:

  • Sun JDK 1.2.2 Production Release or Blackdown JDK 1.2.2 RC4 (or higher)
  • libc-2.1.1.so (should be included by default on any RedHat 6.x system)
  • linux kernel 2.2.12 or higher (RedHat 6.x)

To set up ColdFusion 4.5.1 so that Java objects will work:

  1. On the Java page of the ColdFusion Administrator, set the following properties like so:
    • Java Virtual Machine Path: /path/to/jdk1.2.2/jre/lib/i386/classic/libjvm.so
    • Class Path: where your own Java class files reside
    • Initial Heap Size: 4096K is recommended
    • Max Heap Size: 65536K is recommended
    • System Options: java.compiler=NONE
    • CFX Jar Path: /path/to/coldfusion/Java/classes
  2. In the ColdFusion /path/to/coldfusion/bin/start script, edit the LD_LIBRARY_PATH to add pointers to the JDK, for example:
    LD_LIBRARY_PATH=$CFHOME/lib:/usr/jdk1.2.2/jre/lib/i386/classic:»
    /usr/jdk1.2.2/jre/lib:/usr/jdk1.2.2/jre/lib/i386/native_threads:»
    /usr/jdk1.2.2/jre/lib/i386

The CFOBJECT tag is only supported for Java objects (TYPE=JAVA) in this release. When calling Java objects using the CFOBJECT tag, or when using Java CFXs under Linux, a segmentation violation may be reported on the first call. Depending on the JDK/JRE being used (Sun or Blackdown), it may be necessary to add the flags:

java.compiler=NONE

in the System option field on the Java page of the ColdFusion Administrator. This indicates to the JVM that JIT (if present) is disabled.