Message "Error: Could not find or load main class Sample" when running Java program

I am fairly new to Java, and I am following the tutorial from the following site:
     https://www.youtube.com/watch?v=svJQu6LUSTs

I have successfully installed Java,  the JDK, and Ecclipse Indigo.  All of the programs have the same look and feel as they do on the tutorial, so I know the installations have been done correctly.  As per instructed, I have created a sample class, and everything looks like it does in the tutorial.  The problem comes at the end, when I run the program, and I get the message: "Error: Could not find or load main class Sample".  Everything else seems to be as instructed, and I am new enough to this that I can not figure out where to resolve the problem.  I have included a screen shot.  Any assistance would be appreciated.  Thank you, ~ Peter Ferber

Error message shows, even though instruction followed to the letter
PeterFrbWeb development, Java scripting, Python TrainingAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

CEHJCommented:
I am fairly new to Java
In that case, i would not use Eclipse nor any other IDE.

What you're learning now is not Java but Eclipse. There is nothing wrong with the code.

My guess is that you haven't set the main class properly in the project properties
0
PeterFrbWeb development, Java scripting, Python TrainingAuthor Commented:
I did figure this out myself.  In response to the error message, "The project cannot be built until the build path errors are resolved.", I did a google search and found the following site:
    https://stackoverflow.com/questions/3632632/the-project-cannot-be-built-until-the-build-path-errors-are-resolved 

The problem was a library that wasn't really doing its job.  Once I got rid of it, leaving the functional intact, the errors went away and the program ran!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
CEHJCommented:
Yes, i should have enlarged the image. The class appears to have compilation errors that are not due to errors in the code shown. But ... that's a problem that's much less likely to occur were you to be compiling at the command line. The IDE hides stuff from you
0
PeterFrbWeb development, Java scripting, Python TrainingAuthor Commented:
My own research and followup were responsible for finding and resolving the problem.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Eclipse

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.