title: java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials
body: <p>I am running the Glacier API for AWS, just a very basic version - trying to list my vaults.</p>
  
  <p>I followed the example at <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults-sdk-java.html#creating-vaults-sdk-java-example" rel="nofollow">http://docs.aws.amazon.com/amazonglacier/latest/dev/creating-vaults-sdk-java.html#creating-vaults-sdk-java-example</a>.</p>
  
  <p>I am running from the command line on Linux. It compiles fine:</p>
  
  <pre><code>javac -cp sdk/lib/aws-java-sdk-1.7.3.jar -d bin src/AmazonGlacierVaultInfo.java
  </code></pre>
  
  <p>But when running, I get:</p>
  
  <pre><code>java -cp "bin: sdk/lib*" AmazonGlacierVaultInfo
  
  Exception in thread "main" java.lang.NoClassDefFoundError: com/amazonaws/auth/AWSCredentials
  </code></pre>
  
  <p>It seems the SDK classes in the sdk jar are not being found.</p>
  
  <p>I have my classpath correct though I think:</p>
  
  <pre><code>./:/home/name/sites/git/glacier/bin/:/home/name/sites/git/glacier/sdk/:/home/name/sites/git/glacier/src/
  </code></pre>
  
  <p>I run and compile from /home/name/sites/git/glacier, which has bin, src and sdk directories as detailed on <a href="http://docs.aws.amazon.com/amazonglacier/latest/dev/using-aws-sdk-for-java.html#setting-up-and-testing-sdk-java-commandline" rel="nofollow">http://docs.aws.amazon.com/amazonglacier/latest/dev/using-aws-sdk-for-java.html#setting-up-and-testing-sdk-java-commandline</a></p>
  
  <p>Any help would be greatly appreciated.</p>