Search code examples
javajettyjava1.4

why won't jetty 6.1.x run with java 1.4.2?


Dcoumentation everywhere I can find suggests that jetty 6.1.x should still run with java 1.4.2.

Yet, if I download a jetty binary, and "java -jar start.jar", I get variations of:

"Exception in thread "main" java.lang.UnsupportedClassVersionError: (org/mortbay/xml/XmlConfiguration) bad major version at offset=6"

I've tried it with jetty 6.1.26 downloaded from dist.codehouse.org/jetty. I've tried with with the 'hightide' jetty release 6.1H.24 and hightide-6.1H.8.

My java is:

$ java -version java version "1.4.2" Java(TM) 2 Runtime Environment, Standard Edition (build 2.3) IBM J9 VM (build 2.3, J2RE 1.4.2 IBM J9 2.3 Linux amd64-64 j9vmxa64142ifx-20100113 (JIT enabled) J9VM - 20100112_51454_LHdSMr JIT - 20090210_1447ifx1_r8 GC - 200902_24)

I know this is anchient java here, but I've got some ancient code to run on it. Everywhere SAYS jetty 6.1 should run on java 1.4. I even find ancient blog posts saying they did run jetty 1.6 with java 1.4.

So what's up? What am I doing wrong?


Solution

  • Okay, I figured it out.

    jetty 6.1.26 in particular, and all jetty 6.1.x in general, DO run on Java 1.4, and the .jars distributed on the official site ARE compiled to work with java 1.4.

    So why wasn't it working for me?

    Some of the sample webapps distributed with jetty do NOT work under 1.4, they are not compiled for 1.4. I don't know if this a packaging accident or what.

    But if I delete all the sample apps, by deleting everything in ./webapps and ./contexts, then the stock distro binary jetty 6.1.26 release starts up fine under 1.4, and works fine when I install my own webapps.