provide-free-support Ujjwal's Blog: Backporting Struts 2 to JDK1.4 or JDK 1.3

Tuesday, January 25, 2011

Backporting Struts 2 to JDK1.4 or JDK 1.3

Struts 2 framework and its dependencies available currently are compiled using JDK 1.5 and if you want to use same framework on JDK1.4 then you will require to backport these jars. Struts 2 framework core jars and its plugin jars can be translated to JDK 1.4 or 1.3 using Retrotranslator utility.

Retrotranslator is a open source project which does this translation.

You can read more about this on http://retrotranslator.sourceforge.net/

Here are the steps to create the backport jars for JDK 1.4 or JDK 1.3

1. Download Struts 2 - Alternative Java 4 JARs: from http://struts.apache.org.
This also contains the retrotanslator jar files

2. Unzip the downloaded file, this should create backport folder containing core jars, and retrotranslation jar files.

3. Now copy all your Struts 2 Jars (including dependancies) to a folder say (Struts2-1.5)

4. Create another folder for converted jar files say (Struts2-1.4)

5. Run below command for each jar in the Struts2-1.5 folder

java -jar retrotranslator-transformer-.jar -advanced -srcjar Struts2-1.5/struts2--.jar -destjar ./Struts2-1.4/struts2--.jar



Note: Replace the & tokens with appropriate jar values.
Here are commands for struts 2.0.11.2 backporting

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-core-2.0.11.2.jar -destjar Struts2-1.4/struts2-core-j4-2.0.11.2.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/xwork-2.0.5.jar -destjar Struts2-1.4/xwork-j4-2.0.5.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-codebehind.jar -destjar ./Struts2-1.4/struts2-codebehind.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-core.jar -destjar ./Struts2-1.4/struts2-core-1.4.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-spring.jar -destjar ./Struts2-1.4/struts2-spring.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-pell.jar -destjar ./Struts2-1.4/struts2-pell.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-plexus.jar -destjar ./Struts2-1.4/struts2-plexus.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-struts1.jar -destjar ./Struts2-1.4/struts2-struts1.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-jsf.jar -destjar ./Struts2-1.4/struts2-jsf.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-sitegraph.jar -destjar ./Struts2-1.4/struts2-sitegraph.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-sitemesh.jar -destjar ./Struts2-1.4/struts2-sitemesh.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-tiles.jar -destjar ./Struts2-1.4/struts2-tiles.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/struts2-config-browser.jar -destjar ./Struts2-1.4/struts2-config-browser.jar

java -jar retrotranslator-transformer-1.2.2.jar -advanced -srcjar Struts2-1.5/xwork-2.0.5.jar -destjar ./Struts2-1.4/xwork-2.0.5.jar


6. This should create all your jars which are required for JDK 1.4.

7. Make sure you delete all JDK 1.5 compiled jars from your application lib and replace it with translated jars for JDK 1.4. Keeping both may create unknown issues.


Retrotranslator is not limited to backporting the Struts 2 framework. Its a utility which can be utilized for backporting any JDK 1.5 compiled code to JDK 1.4.

Cheers,

Ujjwal Soni

1 comment:

Raj said...

Nice post boss.Really ur blog is unique

best-it-exam-    | for-our-work-    | hottst-on-sale-    | it-sale-    | tast-dumps-us-    | test-king-number-    | pass-do-it-    | just-do-it-    | pass-with-us-    | passresults-everything-    | passtutor-our-dumps-    | realtests-us-exam-    | latest-update-source-for-    | cbtnuggets-sale-exam    | experts-revised-exam    | certguide-sale-exam    | test4-sale-exam    | get-well-prepared-    | certkiller-sale-exam    | buy-discount-dumps    | how-to-get-prepared-for-the    | in-an-easy-way    | brain-dumps-sale    | with-pass-exam-guarantee    | accurate-study-material    | at-first-try    | 100%-successful-rate    | get-certification-easily    | material-provider-exam    | real-exam-practice    | with-pass-score-guarantee    | certification-material-provider    | for-certification-professionals    | get-your-certification-successfully    | 100%-Pass-Rate    | in-pdf-file    | practice-exam-for    | it-study-guides    | study-material-sku    | study-guide-pdf    | prep-guide-demo    | certification-material-id    | actual-tests-demo    | brain-demos-test    | best-pdf-download    | our-certification-material    | best-practice-test    | leading-provider-on    | this-course-is-about    | the-most-reliable    | high-pass-rate-of    | high-pass-rate-demo    | recenty-updated-key    | only-for-students-free-download    | courseware-plus-kit-for    | accurate-answers-of    | the-most-reliable-id    | provide-training-for    | welcome-to-buy    | material-for-success-pass    | provide-free-support    | best-book-for-pass    | accuracy-of-the-answers    | pass-guarantee-id    | pass-exam-key    | pass-sku-id    | study-for-exid    | pdf-sku-exid    | sku-pdf-id    | pdf-demo-key    | exam-demo-ske    | pass-it-dump    |
http://www.menuiserie-dauvergne.com/    | http://www.menuiserie-dauvergne.com/    |