AdobeStock_455007340

Changing the ColdFusion JRE

Several months ago I posted an entry about changing the JRun JRE (http://www.forta.com/blog/index.cfm?mode=e&entry=1026). A couple of users have asked me how to change the ColdFusion JRE if using ColdFusion in standalone server mode (with embedded JRun). The instructions are actually, the same, just the path to the jvm.config file is different. The JRE path is stored in {CFMX root}/runtime/bin/jvm.config. To change the JRE, simply edit this file and set java.home to the desired path. Be sure to make a backup of the file first, and you’ll also need to restart ColdFusion for the change to take affect.

18 responses to “Changing the ColdFusion JRE”

  1. Juerg Anderegg Avatar
    Juerg Anderegg

    for those having troubles installing a new JRE (like I did): With MX 6.1 you have to install the whole SDK, not only JRE, because ColdFusion needs a ‘Hot-Spot JVM’ which is not included in the JRE. If you only install the JRE and change the path in jvm.config to the new location, ColdFusion will start with an ‘error 2’ and you’ll get an errormessage in {CFMX root}/runtime/logs/default-err.log like ‘Error: no `server’ JVM at c:/Program Files…’

  2. Alin Winters Avatar
    Alin Winters

    If you use SDK 1.3 you might get GCParallel option unknown error. Download a newer SDK. 1.4.2_04 works.

  3. Imran Aziz Avatar
    Imran Aziz

    This still does not work for us, I have Red Hat Linux 3.0ES with CFMX 6.1 installed on it, and I have tried using IBM SDK 1.4.2_04, but I keep on getting the error
    Error: no `server’ JVM at `/opt/IBMJava2-142/jre/bin/server/libjvm.so’.
    Can anyone please guide me with how to sort this out, I have been trying for a very long time to sort this out, our CF Server crashes each night with Hot Spot Error and using IBM JVM seems to be the only solution to it.

  4. Lee Bryant Avatar
    Lee Bryant

    Looking at the massive number of threads about the HotSpot error on CFMX/Linux/Sun JVM_1.4.2 it seems that CFMX takes down the JVM under any kind of decent load and, AFAIK, there are no fixes available.
    If IBM JVM 1.5 is not certified for use with CFMX then what can we do except give up on CF?
    Anyone know better?

  5. Ben Johnson Avatar
    Ben Johnson

    We’ve had our share of troubles with HotSpot errors, so we tried the Java 1.5 JVM (from Sun) when it came out, and it seemed to stop the Hotspot problems.
    Wel, we recently upgraded to CFMX 7, and now the 1.5 JVM won’t work! Is Macromedia going to either deal with these Hotspot problems, or at least certify CFMX7 with 1.5?

  6. Mark Brettin Avatar
    Mark Brettin

    I just downloaded JDK 1.5 and tried to point my
    CFMX to it but I’m unable to get it to work. Has
    anyone gotten CFMX to work with 1.5?

  7. Samson Avatar
    Samson

    These are the steps I used to get the server install of ColdFusion MX7 with embedded JRun
    working with the Sun JDK 1.5. This resolves such issues as "Unsupported major.minor version 49.0"
    when trying to instantiate a java object in ColdFusion that was compiled using Java 5.
    1. Download JRun4 Updater 6 from http://www.macromedia.com/support/jrun/updaters.html
    2. Make sure the ColdFusion service is stopped
    3. Install JRun4 Updater 6 into the runtime folder of your ColdFusion install directory.
    4. Download and install Java JDK 1.5
    5. Open the jvm.config file found in the runtimebin folder under your ColdFusion install directory
    6. Find the line that sets the java.home property under the "VM Configuration" heading
    7. Modify this line to point to your JDK 1.5 home directory. Make sure to escape backslashes
    (example: java.home=C:\Program Files\Java\jdk1.5.0_03)
    8. Reboot the computer

  8. Hans Avatar
    Hans

    Out of curiousity, why:
    java.home=C:\Program Files\Java\jdk1.5.0_03
    instead of:
    java.home=C:\Program Files\Java\jdk1.5.0_03\jre
    A few other related questions…
    * For 7.0.1, is JDK required or is JRE sufficient?
    * Is JDK 5.0 officially supported yet?
    * Any known issues using JDK 5.0 versus J2SE 1.4.2 SDK?
    * Is it best practice to install updates for JRun on a production server as they become available, or to wait for ColdFusion updates (which may include updates for JRun as well)? For example, as far as I know JRun4 Updater 6 isn’t yet included in the latest ColdFusion update. Should it be applied to production servers anyway?

  9. Terry Ford Avatar
    Terry Ford

    << Looking at the massive number of threads about the HotSpot error on CFMX/Linux/Sun JVM_1.4.2 it seems that CFMX takes down the JVM under any kind of decent load and, AFAIK, there are no fixes available. >>
    We had a terrible time getting CFMX stable under load on linux. Finally, we found a JVM that worked.
    If you’re running into hotspot errors under load, try Sun JVM 1.4.2_10
    What’s strange is that versions AFTER 10 crash for us too. 10 is it.

  10. Ted Daniels Avatar
    Ted Daniels

    Unsupported major.minor version 49.0"
    I tried the suggestion by Samson, tried pointing the jvm.config file to programfiles\java\jdk… and ColdFusion server refuses to start. CHecked the JRUN4bin and it had the same patch as the CFMXRuntimelibjvm.config, albeit the JRUN file had the path written as c:/program files/java/jdk….
    Either CF server won’t start (if I edit jvm.config) or I can’t point to the JDK and get the "Unsupported major.minor vesion 49.00". Any suggestions welcome.
    Ted Daniels

  11. Wil Genovese Avatar
    Wil Genovese

    Which JVM HotSpot crashes are you (et all) seeing?
    The only HotSpot crash we see starts out like this: (if anyone want to see the whole thing I can email it to you upon request.)
    #
    # An unexpected error has been detected by HotSpot Virtual Machine:
    #
    # SIGSEGV (0xb) at pc=0x405416dc, pid=24366, tid=16384
    #
    # Java VM: Java HotSpot(TM) Server VM (1.4.2_12-b03 mixed mode)
    # Problematic frame:
    # V [libjvm.so+0x3b16dc]
    #
    ————— T H R E A D —————
    Current thread (0x08060d58): JavaThread "DestroyJavaVM" [_thread_blocked, id=24366]

  12. Timothy Rubel Avatar
    Timothy Rubel

    This fixes ERROR "Unsupported major.minor version 49.0" and "Unsupported major.minor version 50.0" on my Windows Server 2003 SP1 and Coldfusion MX 7.02 system.
    1. Make sure the ColdFusion service is stopped.
    2. Download JRun4 Updater from http://www.macromedia.com/support/jrun/updaters.ht
    jrun4-win-en-updater.exe
    3. Install JRun4 Updater into the runtime folder of your ColdFusion install directory.
    C:CFusionMX7runtime
    4. Download and install Java JDK 1.5 ( jdk-1_5_0_11-windows-i586-p.exe )
    5. Open both jvm.config files found in these directories:
    C:CFusionMX7runtimebin
    C:CFusionMX7runtimeupdater6-backupbin
    6. Find the line that sets the java.home property under the "VM Configuration" heading ( change "java.home=C:/CFusionMX7/runtime/jre" to "java.home=C:/Program Files/Java/jdk1.5.0_11/jre" in both files.
    7. Restart coldfusion.
    It took me week reading Adobe forums and I finally found part of the answer in Samson’s post above. I hope this saves you all time.

  13. Kathy Avatar
    Kathy

    Just a comment to an earlier post – if you point to a JDK, you do want to point to the JDK root, and not the JRE folder inside the JDK root.
    The steps posted by Samson worked perfectly for me. I’m using ColdFusion 6 with the default JRun from the download. I developed code in Java 5.

  14. Matt Avatar
    Matt

    If you don’t feel like changing the JRE version, you can also just recompile the java source using the -source <version> to make it compatible with a lesser version of Java… e.g ‘java -source 1.4 -classpath …’ would make it compatible with Java 1.4

  15. how to play virtual roulette machines Avatar
    how to play virtual roulette machines

    The person who create this post he is a great human..thanks for shared this with us.i found this informative and interesting blog so i think so its very useful and knowledge able….
    http://www.topvirtualroulette.com

  16. Anna Avatar
    Anna

    >I just downloaded JDK 1.5 and tried to point my
    >CFMX to it but I’m unable to get it to work. Has
    >anyone gotten CFMX to work with 1.5?
    Try set
    -Djmx.invoke.getters=true
    to the JVM arguments.
    Anna
    _______________________
    http://skylinemp3.com/

  17. Azib Mania Avatar
    Azib Mania

    Can anyone please guide me with how to sort this out, I have been trying for a very long time to sort this out, our CF Server crashes each night with Hot Spot Error and using IBM JVM seems to be the only solution to it.

    http://hitwap.mobi

Leave a Reply