I have a Java code that can run correctly in eclipse.


I need to run this java program outside eclipse, so I tried to export it as executable jar file.

I have one warning poped up:

Then, I have JAR creating failed error with Resource is out of sync message.

What might be wrong? What’s the command to execute the java program outside the eclipse?
ADDED
Googling ( Eclipse source out of sync with file system ) to remove the resource is out of sync error, but I have many duplicate errors.

Why do I have these errors? How can I remove them? I downloaded the project from mercurial repository.
I could generate the executable jar, this is the summary that I had to do in order to make it work.
Removing the duplicate file.
I found some error messages saying that there are duplicate files. I couldn’t understand why eclipse thinks there are duplicate files, but by removing the files, I could remove the errors.
Excluding some of the files
In Build -> Configure Build Path

I had to remove or exclude source folders.
Always sync by refreshing
I had to use F5 key to refresh the build, or I could do that automatically using eclipse setup :