[logback-user] Re: Using Logback on JDK1.4 possible?

Gerweck Andy - agerwe Andy.Gerweck at acxiom.com
Fri Jan 12 20:54:37 CET 2007

Personally, I have had excellent luck using Retroweaver
[http://retroweaver.sourceforge.net/] to back-convert my Java 5 code for
deployment on earlier JVM runtimes. Retroweaver can handle *every*
linguistic feature from Java 5. (Most of the linguistic changes in Java
5, even generics, have almost no incompatible effects on the compiled
bytecode.) You feed it classes compiled with Java 5 and it spits out
classes that will work on earlier JVMs. It requires only that you add a
small JAR to your classpath.

It also combines with the backport-util-concurrent project
[http://dcl.mathcs.emory.edu/util/backport-util-concurrent/] to handle
java.util.concurrent, Java 5's biggest library enhancement.

Except where Java 5 adds new methods (e.g., String.format(...)) to old
classes, Retroweaver can handle almost any Java 5 program. I put some
back-compiled code through our QA department, which could find no
performance or functionality problems.

I *strongly* recommend you put in the slight extra effort to run
Retroweaver's library-check utility. Point it to your JRE libraries and
it will go through the code to ensure it doesn't try to use any methods
or classes not available in your JRE (make sure to include the
Retroweaver runtime JAR). This will catch those library changes I
mentioned that Retroweaver doesn't handle--which is much better than a
missing class or method at runtime. If you pass this test, you shouldn't
have any problems. 

I have no affiliation with Retroweaver, though I did submit a patch to
the backport-util-concurrent project. I make no claims that it'll work
for you, but I'd bet you could run through the LOGBack JAR and get it
running on JDK 1.4. If you do, you may want to share your work. Just
feed in the LOGBack JARs you need and use the output instead of the

Andy Gerweck
Software Engineer

PS: In good conscience, I can't help but recommend you upgrade to Java 5
or higher if at all possible. We're reaching the point where it's bad
practice and poor style not to use Java 5's important language
enhancements. There are also great runtime advantages, so it's not
advisable to force a runtime upgrade where possible.
The information contained in this communication is confidential, is
intended only for the use of the recipient named above, and may be legally

If the reader of this message is not the intended recipient, you are
hereby notified that any dissemination, distribution or copying of this
communication is strictly prohibited.

If you have received this communication in error, please resend this
communication to the sender and delete the original message or any copy
of it from your computer system.

Thank You.

More information about the Logback-user mailing list