Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8207239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T08:56:02+00:00 2026-06-07T08:56:02+00:00

I am trying to run an application that reads and writes to the amazon

  • 0

I am trying to run an application that reads and writes to the amazon dynamo DB. I downloaded the Eclipse toolkit and AWS SDK and if I run the application from my local PC it works perfectly. Next, I exported it to a jar file and uploaded it to my EC2 instance. However, when I run it there I get an error.

  /home/apps/java/database/bin$ java -jar myJar.jar
Exception in thread "main" java.lang.NoClassDefFoundError: com/amazonaws/auth/AW                                                                  SCredentials
Caused by: java.lang.ClassNotFoundException: com.amazonaws.auth.AWSCredentials
        at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: DynamoDB. Program will exit.

I assume it has to do with the classpath, but in /home/ubuntu/.bashrc I have set it as such:

CLASSPATH="./:/home/apps/java/database/bin/*:/home/apps/java/database/bin/aws-java-sdk-1.3.12.jar"
export CLASSPATH

/home/apps/java/database/bin contains all the .jar files that are in the AWS SDK:

  • aspectjrt.jar
  • aspectjweaver.jar
  • aws-java-sdk-1.3.12.jar
  • aws-java-sdk-1.3.12-javadoc.jar
  • aws-java-sdk-1.3.12-sources.jar
  • aws-java-sdk-flow-build-tools-1.3.12.jar
  • commons-codec-1.3.jar
  • commons-logging-1.1.1.jar
  • freemarker-2.3.18.jar
  • httpclient-4.1.1.jar
  • httpcore-4.1.jar
  • jackson-core-asl-1.8.7.jar
  • jackson-mapper-asl-1.8.7.jar
  • mail-1.4.3.jar
  • myJar.jar
  • spring-beans-3.0.7.jar
  • spring-context-3.0.7.jar
  • spring-core-3.0.7.jar
  • stax-1.2.0.jar
  • stax-api-1.0.1.jar

What am I missing?? I have been looking at this for a day and a half. Thank you in advance!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T08:56:04+00:00Added an answer on June 7, 2026 at 8:56 am

    The classpath entry of “/directory/*” may be messing things up. Classpaths are separated with colons, but asterisk expansion gives spaces. Try this little shell script to start it.

    #!/bin/sh
    JAVA_OPTS="-Xms256M -Xmx4G"
    CP=`find /home/apps/java/database/bin/*jar -exec echo -n "{}:" \;`
    java -cp ${CP%?} -jar yourjar.jar
    

    A couple of notes:

    • the JAVA_OPTS is only there as a reminder that you may need more memory than the default.
    • the crazy syntax for CP on the final line strips the last character, since the “find” line is leaving a colon on the end.
    • You may want to include your jar and launch the correct class if it isn’t an executable jar.

    Hope this helps!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to run a web application that gets a specific length of
I am trying to write a small Java application that will let me run
I am trying to investigate how to develop an UI application that will run
I am trying to run an andriod application from emulator , but whenever i
I'm trying to run a python application from source, and it has: from shader
I am getting an error when trying to run my web application from IIS
I recently noticed that when trying to run my application on the Gingerbread emulation,
I was trying to run my application and check for some output on the
I get the following error when trying to run my application. There are no
I'm trying to run my web application using Spring, Hibernate and Apache Tiles. It

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.