Using the AWS SDK for Java in Eclipse

By: Emiley J Viewed: 153505 times  Printer Friendly Format    


If you use the AWS Toolkit for Eclipse, you can also start a new project in Eclipse based on the AWS SDK for Java or add the SDK to an existing Java project.

Install the AWS Toolkit for Eclipse

See http://aws.amazon.com/eclipse for information about downloading and installing the AWS Toolkit for Eclipse.

NOTE: After installing the AWS Toolkit for Eclipse, we recommend configuring the toolkit with your security credentials. You can do this anytime by selecting Preferences from the Window menu in Eclipse, and then selecting the AWS Toolkit section.

To start a New Project

  1. Open Eclipse.
  2. Create a new AWS Java project by pointing to File -> New -> Project. The New Project wizard opens.
  3. Expand the AWS category, then select AWS Java Project.



  4. Click Next. The project settings page is displayed.



  5. Enter a name in the Project Name box. The AWS SDK for Java Samples group displays the samples available in the SDK, as described above.
  6. Select the samples you want to include in your project by selecting each check box.
  7. Enter your AWS credentials. If you’ve already configured the AWS Toolkit for Eclipse with your credentials, this is automatically filled in.
  8. Click Finish. The project is created and added to the Project explorer.

To run the Project

  1. Select the sample .java file you want to run. For example, for the Amazon S3 sample, selectS3Sample.java.
  2. Select Run from the Run menu.

To add the SDK to an existing project

  1. Right-click the project in the Project Explorer, then select Build Path -> Add Libraries….
  2. Select AWS Java SDK, then click Next and follow the remaining on-screen instructions.


Most Viewed Articles (in Java )

Latest Articles (in Java)

Comment on this tutorial