Thursday, June 4, 2009

Configuring the STRUTS application in Eclipse Version 3.4.2

Configuring the STRUTS application in Eclipse Version 3.4.2
1. Open new Java Project
2. Choose 'Create project from existing source' option. Click 'Browse' button.
3. Now, find your Struts appplication folder. (My Struts application location is C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/struts2tutorial/ ). Click OK.
4. Name your Project. Click 'Next'.
5. Click 'Finish' and your Struts application will be added to your Eclipse.
6. Now, we will build your Struts Application by using Ant Build.
7. From your Eclipse Package Explorer, select WEB-INF --> src. Right click the 'build.xml' and click 'Ant Build'.
8. Console tab will be displayed to show the progress of the application building.
9. If you encounter failure in building the application, such as you get error message 'build.xml:55: Error starting modern compiler', it means that you are using incorrect version of JRE.
10. To resolve issue in point. 9, make sure you install higher version of JRE. In my case, I will upgrade it from JRE 1.5 to JRE 1.6
11. After you have get your JRE 1.6, you need to installed in your Eclipse. To do this, read the point 12.
12. Go to 'Run' --> 'External Tools' --> 'External Tools Configurations' --> Open the 'JRE' tab.
- Choose the 'Seperate JRE' option and click 'Installed JREs' button.
- In the next screen, choose 'Standard VM' and click 'Next'
- Click 'Directory' button next to 'JRE Home' and select the root folder of your new JRE (1.6)
- Click 'Finish' and your JRE 1.6 will be added into Installed JREs list. Make sure you tick
the checkbox next to the JRE 1.6. Click 'Ok'.
- In the 'Seperate JRE' check box, make sure you select JRE 1.6. Click 'Apply'. Click 'Run'.
- You will see that your Struts will be built successfully.
Good Luck.. ^^

No comments:

Post a Comment

Followers