I got the following error:
Exception in thread "main" java.lang.NoClassDefFoundError: org/eclipse/core/commands/common/EventManager
The fix was simple. I went to this website:
and I downloaded the commands.jar.
download : http://mirrors.ibiblio.org/pub/mirrors/maven2/org/eclipse/core/commands/3.3.0-I20070605-0010/commands-3.3.0-I20070605-0010.jar
md5 hash : e762e07da9f9b4937d119c9800598a8f
size : 103384 bytes
I added the jar to the project and worked like a charm. Hope this helps someone.