Store with a Database"
Line 12: | Line 12: | ||
#Click '''Next''' and the WAR file will be imported | #Click '''Next''' and the WAR file will be imported | ||
#You should now have a clean project imported with no errors. At this point you can run the index.zul page on your server | #You should now have a clean project imported with no errors. At this point you can run the index.zul page on your server | ||
− | #: | + | #:NOTE: When importing, if eclipse is showing a lot of errors, please see the section below the '''Dealing with Errors''' label. |
#:[[File:ZKEss_imported.png]] | #:[[File:ZKEss_imported.png]] | ||
Revision as of 08:23, 22 June 2011
This article is out of date, please refer to http://books.zkoss.org/zkessentials-book/master/ for more up to date information.
When it comes to importing a project into eclipse, the easiest way is to make use of the WAR file, which is provided in the SVN. We can directly import the WAR file using eclipse’s import mechanism.
- To start importing, please go to File -> Import in eclipse and you will see the following dialog
- Type WAR into the filter text and then select the storewithdb WAR file you just downloaded and press Next.
- Download the WAR file from https://zkbooks.googlecode.com/svn/trunk/zkessentials/storewithdb/storewithdb.war and place it into an accessible folder
- In the WAR import screen, browse for the WAR file and select it. The rest of the fields should be filled out automatically
- Click Next and the WAR file will be imported
- You should now have a clean project imported with no errors. At this point you can run the index.zul page on your server
Dealing with Errors
You may be seeing a lot of errors in your project say something along the lines of:
You should see errors referring to the fact that annotations are only available in Java 1.5. Right click on one of the errors and click Quick Fix:
On the following screen make sure "change project compliance to JRE 1.5 is selected and click finish:
Having done that we should have approximately 1 item left in the problems list. This should state that the Java compiler level does not match the version of the installed Java project facet:
Right click on the error and click quick fix as before. Then in the following screen select the item "Change Java project facet version to Java 5.0" and press Finish.
You should find that all the errors are now fixed and you can continue to run the application.