Finding the Eclipse Version Number
Solution 1:
(Update September 2012):
MRT points out in the comments that "Eclipse Version" question references a .eclipseproduct
in the main folder, and it contains:
name=Eclipse Platform
id=org.eclipse.platform
version=3.x.0
So that seems more straightforward than my original answer below.
Also, Neeme Praks mentions below that there is a eclipse/configuration/config.ini
which includes a line like:
eclipse.buildId=4.4.1.M20140925-0400
Again easier to find, as those are Java properties set and found with System.getProperty("eclipse.buildId")
.
Original answer (April 2009)
For Eclipse Helios 3.6, you can deduce the Eclipse Platform version directly from the About screen:
It is a combination of the Eclipse global version and the build Id:
Here is an example for Eclipse 3.6M6:
The version would be: 3.6.0.v201003121448, after the version 3.6.0 and the build Id I20100312-1448 (an Integration build from March 12th, 2010 at 14h48
To see it more easily, click on "Plugin Details" and sort by Version.
Note: Eclipse3.6 has a brand new cool logo:
And you can see the build Id now being displayed during the loading step of the different plugin.
Solution 2:
In Eclipse Gallileo:
The about page (Help -> About Eclipse) has some icons towards the bottom of the dialogue. This should include two which are the plain Eclipse icon. Select the one with tooltip "Eclipse.org". Eclipse has many components, each of which has its own version number. The core is the Eclipse Platform
Solution 3:
I think, the easiest way is to read readme file inside your Eclipse directory at path eclipse/readme/eclipse_readme
.
At the very top of this file it clearly tells the version number:
For My Eclipse Juno; it says version as Release 4.2.0
Solution 4:
if you want to access this programatically, you can do it by figuring out the version of eclipse\plugins\org.eclipse.platform_ plugin
String platformFile = <the above file>; //actually directory
versionPattern = Pattern.compile("\\d\\.\\d\\.\\d");
Matcher m = versionPattern.matcher(platformFile);
return m.group();
Solution 5:
Here is a working code snippet that will print out the full version of currently running Eclipse (or any RCP-based application).
String product = System.getProperty("eclipse.product");
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint point = registry.getExtensionPoint("org.eclipse.core.runtime.products");
Logger log = LoggerFactory.getLogger(getClass());
if (point != null) {
IExtension[] extensions = point.getExtensions();
for (IExtension ext : extensions) {
if (product.equals(ext.getUniqueIdentifier())) {
IContributor contributor = ext.getContributor();
if (contributor != null) {
Bundle bundle = Platform.getBundle(contributor.getName());
if (bundle != null) {
System.out.println("bundle version: " + bundle.getVersion());
}
}
}
}
}
It looks up the currently running "product" extension and takes the version of contributing plugin.
On Eclipse Luna 4.4.0, it gives the result of 4.4.0.20140612-0500
which is correct.