First, the setting of the system path:
1, java_home: Install JDK, set Java_Home.
2, J2EE_HOME: Install J2EE SDK, set J2EE_HOME, for example: c: / sun / appserver.
3, ant_home: Download Unzip ANT to set ANT_HOME.
4, Catalina_Home: Install Tomcat, set Catalina_Home.
5, ClassPath: Specify.;% Java_home% / lib / Tools.jar;% java_home% / lib / dt.jar;% J2EE_HOME% / lib / j2ee.jar
6, PATH: Specify% java_home% / bin;% ANT_HOME% / BIN
Second, the settings:
Download JUnit's JAR package, copy it to the% Ant_home% / lib directory.
Third, generate new projects:
1. Download Unzip AppFuse 1.4 to extract to a directory appfuse.
2, modify the file database.properties.reference is Database.properties and remove the settings you don't have to use, keep the database you use, and set the connection address, username, and password.
3, run the database.
4. Enter the appfuse directory and run Ant Setup-DB.
5. After success, run ant new -dapp.name = your_project_name -ddb.name = Your_Project_db_name.
6. After success, a directory named by your project will be generated in the previous directory of AppFuse, assuming to app.
Fourth, import to Eclipse:
1. Open Eclipse, select the file (file) - Import (import), select Exist Project Into Workspace, select the App Directory, click OK, the item import.
2. Select Window-Preference, in the page appear, select Ant --- Runtime-Ant Home Entries, click the Add External Jar on the right, select JUnit's JAR package, click OK.
3, the property setting page, select Java - Buil Path-ClassPath Valiables, click the NEW button on the right, join the path variable of J2EE_HOME and specify the path.
4. Open the build.xml file under the project directory, you can see a lot of tasks in the view window of Ant, select Compile.
V. Run the project:
1. Run Start.Tomcat in the list of Ant tasks, run Tomcat in Eclipse's Console.
2. Open the browser, enter http: // localhost: 8080 / app, you will see the login page.