ColdFusion MX: Using cfchart or other graphics rendering objects on Unix platforms with JVM 1.4.1 or higher
Issue
After installing version 1.4.1 or higher of the Java 2 SDK,cfchart and other graphics rendering objects may no longer function in Macromedia ColdFusion MX. This is due to API changes in the 1.4.1 SDK.
The following error can be thrown under this configuration:
This graphics environment can be used only in the software emulation mode
Many environments do not have a display, keyboard, or mouse. Such an environment is called a "headless" graphics environment. Headless support is enabled in version 1.4.1 and higher of the Java 2 SDK. New Java 1.4 methods indicate whether a display, keyboard, and mouse can be supported in a graphics environment. Due to this new area of functionality, changes need to be made to the JVM arguments used by ColdFusion MX in order for cfchart,cfgraph, and other graphical objects to function correctly.
Solution
Modify the jvm.config file as follows:
- Stop the ColdFusion process:
/cf_root/bin/coldfusion stop
- Open the file /cf_root/runtime/bin/jvm.config in a text editor.
- For cfchart and cfgraph issues, modify the graphics argument so it reads as indicated:
java.args=-DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xbootclasspath/a:{application.home}/lib/webchartsJava2D.jar-Djava.awt.graphicsenv=com.gp.java2d.ExHeadlessGraphicsEnvironment -Xmx512m
- If you have problems with other graphics objects, add the following argument instead:
java.args=-DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xmx512m -Djava.awt.headless=true
Note: Using this option will disablecfchartfunctionality. - Save the changes to jvm.config.
- Start the ColdFusion process:
/cf_root/bin/coldfusion start
This content requires Flash
To view this content, JavaScript must be enabled, and you need the latest version of the Adobe Flash Player.
Download the free Flash Player now!
