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 and Mylyn : how to disable grey files in t
- Installing Pydev for Eclipse throws error
- Error in Scala Compiler: java.lang.AssertionError:
- How to remove unused imports using Eclipse and not
- Assume/switch role in aws toolkit for eclipse 2.0
相关文章
- selenium+eclipse 打开网页时报错
- Eclipse failing to open
- Eclipse how can I indent C++ preprocessor macros
- Why is FindBugs ignoring my check for null?
- Eclipse cleanup - what are the “.index” files - ca
- Eclipse plugin to find out unused methods in a cla
- Spring NamespaceHandler issue when launching Maven
- Google USB Package isn't showing in SDK Manang
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 of4.4.2.M20150204-1700
which is obviously incorrect.I suspect
eclipse.buildId
system property is set to the version oforg.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.Here is a working code snippet that will print out the full version of currently running Eclipse (or any RCP-based application).
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.