Finding the Eclipse Version Number

EclipseVersion

Eclipse Problem Overview


I have posted how to find it in Eclipse Gallileo, but if anyone has information on older versions feel free to post it below.

Eclipse Solutions


Solution 1 - Eclipse

(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:

alt text

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:

alt text

And you can see the build Id now being displayed during the loading step of the different plugin.

Solution 2 - Eclipse

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 - Eclipse

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 - Eclipse

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 - Eclipse

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.

Solution 6 - Eclipse

For Eclipse Java EE IDE - Indigo: Help > About Eclipse > Eclipse.org (third from last). In the 'About Eclipse Platform' locate Eclipse Platform and you'll have the version beneath the Version Column. Hope this helps J2EE Indigo Users.

Solution 7 - Eclipse

There is a system property eclipse.buildId (for example, for Eclipse Luna, I have 4.4.1.M20140925-0400 as a value there).

I'm not sure in which version of Eclipse did this property become available.

Also, dive right in and explore all the available system properties -- there is quite a bit of information available under eclipse.*, os.* osgi.* and org.osgi.* namespaces.


UPDATE! After experimenting with different Eclipse versions, it seems that eclipse.buildId system property is not the way to go. For example, on Eclipse Luna 4.4.0, it gives the result of 4.4.2.M20150204-1700 which is obviously incorrect.

I suspect eclipse.buildId system property is set to the version of org.eclipse.platform plugin. Unfortunately, this does not (always) give the correct result. However, good news is that I have a solution with working code sample which I will outline in a separate answer.

Solution 8 - Eclipse

Based on Neeme Praks' answer, the below code should give you the version of eclipse ide you're running within.

In my case, I was running in an eclipse-derived product, so Neeme's answer just gave me the version of that product. The OP asked how to find the Eclipse version, whih is what I was after. Therefore I needed to make a couple of changes, leading me to this:

    /**
     * Attempts to get the version of the eclipse ide we're running in.
     * @return the version, or null if it couldn't be detected.
     */
	static Version getEclipseVersion() {
		String product = "org.eclipse.platform.ide";
        IExtensionRegistry registry = Platform.getExtensionRegistry();
        IExtensionPoint point = registry.getExtensionPoint("org.eclipse.core.runtime.products");
        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) {
        					return bundle.getVersion();
        				}
        			}
        		}
        	}
        }
        return null;
	}

This will return you a convenient Version, which can be compared thus:

    private static final Version DESIRED_MINIMUM_VERSION = new Version("4.9"); //other constructors are available
    boolean haveAtLeastMinimumDesiredVersion()
		Version thisVersion = getEclipseVersion();
		if (thisVersion == null) {
			//we might have a problem
		}
		//returns a positive number if thisVersion is greater than the given parameter (desiredVersion)
		return thisVersion.compareTo(DESIRED_MINIMUM_VERSION) >= 0;
    }

Solution 9 - Eclipse

For Eclipse Kepler, there is no Help > About Eclipse but I found this works:

Eclipse > About Eclipse

Solution 10 - Eclipse

1 - Open Eclipse IDE. 2 - Press: Alt + H 3 - Use keyboard arrows to go dwn the list 4 - Select About Eclipse IDE tab.

Solution 11 - Eclipse

If you're using mac, then About Eclipse is available in Eclipse option at the top.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionCasebashView Question on Stackoverflow
Solution 1 - EclipseVonCView Answer on Stackoverflow
Solution 2 - EclipseCasebashView Answer on Stackoverflow
Solution 3 - Eclipserai.skumarView Answer on Stackoverflow
Solution 4 - EclipsesudhanView Answer on Stackoverflow
Solution 5 - EclipseNeeme PraksView Answer on Stackoverflow
Solution 6 - EclipseMario GaleaView Answer on Stackoverflow
Solution 7 - EclipseNeeme PraksView Answer on Stackoverflow
Solution 8 - EclipseM_MView Answer on Stackoverflow
Solution 9 - EclipseMichael OsofskyView Answer on Stackoverflow
Solution 10 - EclipseIvanView Answer on Stackoverflow
Solution 11 - EclipseAnanthu K KumarView Answer on Stackoverflow