What's new? | Help | Directory | Sign in
Google
                
Search
for
Updated Nov 06, 2007 by kwhsim
EclipseProjectSetup  
Instructions for setting up Eclipse project for checkout SDK

Adding Subversion Support in Eclipse

First download and install Eclipse Europa Java EE Developer Edition. Then start eclipse, and create a new workspace. Then follow these steps to download and install Subversion plugin:

  1. Open Help | Software Updates | Find and Install
  2. Select "Search for new features to install"
  3. Click on "New Remote Site"
  4. Choose Name as subclipse, and URL as: http://subclipse.tigris.org/update_1.2.x
  5. Click on Finish
  6. Select the checkbox for "Subclipse Plugin" and press "Next"
  7. Accept the license terms and press "Next" and then "Finish" to install subclipse.
  8. Accept any prompts for installation, and eclipse restart.
  9. Congratulations! You now have subversion support available in Eclipse.
  10. Note: At this point you'll notice some errors including getServletContext() and getServletConfig() being undefined. This is because these functions require certain Apache Tomcat libraries. We'll fix these later in creating the Checkout SDK below.

Creating Checkout SDK in Eclipse

  1. Start Eclipse, and select "SVN repository Exploring" perspective in Window | Open Perspective | Other
  2. Right click in the "SVN Repository" tab, and select New | Repository Location
  3. For Url, use https://google-checkout-java-sdk.googlecode.com/svn/trunk/, and press "Finish"
  4. Use your gmail user-name, and googlecode.com password. Note that the googlecode.com password is different from your gmail password and is auto-generated. You can view your googlecode.com password at: http://code.google.com/p/google-checkout-java-sdk/source
  5. Navigate down in the tree rooted at https://google-checkout-java-sdk.googlecode.com/svn/trunk/. Right click on sdk, and select "Checkout...". Accept default values.
  6. Download the Java 2 Standard Edition Runtime Environment (JRE) or the full JDK, release version 5.0 or later, from http://java.sun.com/j2se if you don't have it already.
  7. Set your JAVA_HOME variable to the JDK base directory (ex: C:\Sun\SDK\jdk) or the JRE_HOME variable to the JRE base directory (ex: C:\Sun\SDK\jdk\jre)
  8. Download and install Tomcat 6.0 at http://tomcat.apache.org/ if you don't have it already.
  9. Switch to "Java EE" or "Java" perspectives to start development on this project.
  10. Right-click on the root node, google-checkout-java-sdk, and select properties.
  11. Select "Targeted Runtimes" and create a new runtime for Apache | Apache Tomcat 6.0.
  12. (Only in the Java EE perspective) Select "Servers" tab below the main editor window. Right-Click in the window and select New | Server. Choose Apache | Tomcat 6.0 Server, click Next. Then click "Add All >>" to configure the project on the server.
  13. Clean and Rebuild the project by going to Project | Clean... and then selecting "Clean projects selected below" and ensuring that google-checkout-java-sdk is checked and then click Ok. This should get rid of the errors we have seen before.
  14. Congratulations, you now have the Checkout SDK project setup with Eclipse.
  15. To run the SDK, right click on the google-checkout-java-sdk node, select "Run As" | "Run On Server"

Other Notes

  1. If you still encounter errors, right-click on the google-checkout-java-sdk node and select "Properties...". Select Java Build Path on the left, and then select the tab Libraries, and ensure that Apache Tomcat v6.0 is one of the libraries. This includes necessary jars at "<APACHE_HOME_DIR>/lib" like the servlet-api.jar. If its not there, then you can select "Add Library..." from the same menu. Then select "Server Runtime" and then Apache Tomcat v6.0

Comment by kwhsim, Nov 05, 2007

Please let our team know if you encounter any errors while using these setup instructions.


Sign in to add a comment