Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not find or load main class com.amazon.aes.webservices.client.cmd

After I run the EC2 API tools, I run the command: ./ec2-cmd

However, I still get the error: Error: Could not find or load main class com.amazon.aes.webservices.client.cmd.

According to the guide: http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/running-an-instance.html

I'm suppose to run the ec2 commands, but none of the commands run due to the error above.

Any solutions?

like image 744
user1480718 Avatar asked Nov 19 '25 23:11

user1480718


1 Answers

You must have the environment variable $JAVA_HOME and java correctly configured. The Path environment variable also needs to include the EC2_HOME directory.

export EC2_HOME=/usr/local/ec2/ec2-api-tools-xxxversion
export PATH=$PATH:$EC2_HOME/bin 

You can refer to the instructions here: http://docs.aws.amazon.com/AWSEC2/latest/CommandLineReference/set-up-ec2-cli-linux.html as well.

like image 82
amanda fouts Avatar answered Nov 21 '25 20:11

amanda fouts



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!