I currently downloaded and installed the AWS sdk on an EC2 instance using mvn package and everything seemed to install correctly. When I try to run the DynamoDB sameple, it fails with all this:
AmazonDynamoDBSample.java:18: error: package com.amazonaws does not exist
import com.amazonaws.AmazonClientException;
^
AmazonDynamoDBSample.java:19: error: package com.amazonaws does not exist
import com.amazonaws.AmazonServiceException;
^
AmazonDynamoDBSample.java:20: error: package com.amazonaws.auth does not exist
import com.amazonaws.auth.ClasspathPropertiesFileCredentialsProvider;
^
It seems as though the AWS sdk didn't install properly. Any help?
create a maven project and add the following dependency in your pom.xml everything would work fine.
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-java-sdk</artifactId>
<version>1.8.7</version>
</dependency>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.