retrotranslator--Converts a JDK5.0 project to a JDK1.4 byte code.Author: Jiangnan White dress
Because of the appearance of Retrotranslator, Springside finally relieved to JDK5.0, as long as the user in build time select War14 task, the resulting war on the guarantee still 100% running on the JDK1.4 server. With the latest Retrotranslator 1.0.7 support, Springside was successfully deployed on the Tomcat 5.0+jdk1.4.
Can not change the running environment JDK History Project, the customer really gold silver bought does not support JDK5 Weblogic8.1 project, generally can only look at JDK5 annotation, generics and EJB3 dry swallow saliva, so God said to have light, we have this grace thing.
As with the previous recommended Retroweaver, we developed directly with JDK5 , if you need to deploy to the JDK1.4 environment, through ASM to the JDK1.4 byte code.
but it supports not only the new syntax of JDK5, but also a large number of new APIs that support JDK5.
The use of Retrotranslator is simple, you can use the command line, ant, and idea plug-ins to automatically convert, Http://retrotranslator.sf.net clearly, you can convert the jar, you can also convert the class directory.
More specifically, there is a verify option to ensure that you do not use the JDK5 API that it temporarily does not support (remember to join JDK1.4 Rt.jar in classpath).
Attached: Springside war14 Task Brief
When War14 is packaged, it invokes/misc/jdk14/build.xml, generates a jdk1.4 version for Drools,compas,easymock2, and several jars that use JDK1.5 technology, and for the project's classes The catalog generates JDK1.4 versions, and then replaces the original contents of the war with them.
Note that the user may want to set the jdk1.4 path in the/misc/jdk14/build.properties.
Build.xml Fragment:
< target name = "JDK14SRC" >
< taskdef name = "Retrotranslator" classpathref = "Compile.classpath" classname = "Net.sf.retrotra Nslator.transformer.RetrotranslatorTask "/>
< Retrotranslator Destdir = "classes" verify = "true" >
< src Path = ". /.. /springside-bookstore/webapp/web-inf/classes "/>
< Classpath location = "${jdk14_home}/lib/rt.jar"/>
< Classpath refID = "Compile.classpath"/>
</retrotranslator >
</Target >