The version of ecj is specified by the version of JDT that you are using. Go to Help -> About Eclipse -> Installation Details -> Plugins. Look for the org.eclipse.jdt.core version.
I'm guessing that this will answer your question as posed here, but probably won't solve your problem as to why the classes are different.
You should also realize that if you use different options for compilation, then your class files may be slightly different. I forget offhand how to specify options in ecj (I think you pass in a properties file). But inside of Eclipse, the options are specified by merging the workspace and the project options. I'd guess that your differences come from an options mismatch rather than a version mismatch (just a guess though).