Hi Andy,

I've tested Retrotranslator today, and it gives quite good results. I've been able to run all of our JUnit test cases but one with the translated JDK 1.4 jars.

Moreover, Retrotranslator provides a nice maven plug-in that integrates pretty well in the project life cycle. The verification you recommended is also automated with the plug-in.

At this time, there are a few warnings coming from Retrotranslator. They are all directed to javax.management and other JMX related classes. Everything else in logback translates fine. As far as I know, the project that logback depends on should also run under JDK 1.4, but I cannot promise anything about that.

If you want to give a try to the JDK 1.4 jars, you'll need to checkout the project from the repository and run the process-classes phase. Additionally, you will need to setup a variable to the JDK 1.4's rt.jar file in your maven_home/conf/settings.xml. See the parent pom for a comment about this variable.

We'll run more tests with the translated jars. Unless we find something bad, the next release will contain a jdk14 directory with the translated jars.

Thanks for the suggestion!

Cheers,

Sébastien

Gerweck Andy - agerwe wrote:
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
original.

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
privileged.

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.
****************************************************************************
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user


--
Sébastien Pennec
[EMAIL PROTECTED]

Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch/
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user

Reply via email to