Updating to 4.0.0 on Amazon Linux

I update to the new version of cold box with yum and now it won’t run if I jsut try and run box from the command line I get :

Exception in thread “main” java.lang.UnsupportedClassVersionError: cliloader/LoaderCLIMain : Unsupported major.minor version 52.0

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:803)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)

at java.net.URLClassLoader.access$100(URLClassLoader.java:64)

at java.net.URLClassLoader$1.run(URLClassLoader.java:354)

at java.net.URLClassLoader$1.run(URLClassLoader.java:348)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:347)

at java.lang.ClassLoader.loadClass(ClassLoader.java:425)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:323)

at java.lang.ClassLoader.loadClass(ClassLoader.java:358)

at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)

You have the wrong version of java. Just google that error message, it’s super common (although a little confusing). Use java 8.

Is 1.8 required now?

Can I revert cold box to the previous version with yum?

I assume you mean CommandBox, and not ColdBox?? Yes, CommandBox 4.0 requires java 8. java 7 is so old it’s not even funny and Java 10 is now the latest! This is documented here under the section titled “Known Breaking Changes”

It there a good reason you need to use Java 7? Even CF9 will run on java 8 if you are on an older version like update 92.

As far as using yum to install an older version, I’m sure it’s possible but I’m not really a yum expert. You can also download all previous versions of CommandBox here:


No reason just time to update everything.

I just manually installed the old version and it works fine.

I installed 1.8 and 4.0 started, but it’s ignoring the Application.cfc so I guess that was a change as well.

I’ll have to review all the changes and work on my scripts before I update.

thank you for the link to the old versions.

it’s ignoring the Application.cfc

Can you be more specific? Are you talking about starting a server, or running CFMs from the command line? If you mean when you do something like this:

box foo.cfm

then yes that’s another change force by JSR-223 and it’s also documented in that link I sent you. It’s fairly easy to work around and I’d actually recommend you check into using Task Runners. They are much more powerful than just simple .cfm files


Thanks Brad.

Its an existing script i wrote as a cfm file that does some database upkeep from a command line script in linx written in CFML.

I had the datasources setup in the Application.cfc and it worked prior to 4.0

I just did a test with passing the datasource using a structure which connects and works fine. I can rewrite the script when I have time that way if the Application.cfc is not viable.
I’ll research the notes when I get time and see if I can figure it out.

Your help is much appreciated.

Excellent, I assume you’ve seen this page:


I think you’ll like the task runners. To get started, just copy/paste your script into a cfc with a run method. It makes handling input, output, and interactivity way easier.