retrotranslator--converts a JDK5.0 project to a JDK1.4 byte code.

Source: Internet
Author: User
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 >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.