How can I find the ecj version in eclipse?

I'm having a small issue where some java classes compiled in eclipse are slightly different from the classes compiled by a standalone ecj (from the same source code). How can I find the version of ecj that is being used by eclipse? (I'm assuming that's where the difference is)

Upvotes: 5

Views: 1803

Answers (1)

Andrew Eisenberg
Andrew Eisenberg

Reputation: 28737

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).

Upvotes: 3

Related Questions