Showing posts with label os. Show all posts
Showing posts with label os. Show all posts

Thursday, May 28, 2015

How to specify to load a eclipse plugin only on 32 bit machine but not on 64 bit machine.

It’s simple, specify Eclipse-PlatformFilter flag in MANIFEST.MF file with the required criteria.

For example, I wanted to load my plugin only in 32 bit operating systems.
Eclipse-PlatformFilter: (osgi.os=win32)

for adding multiple conditions.
Eclipse-PlatformFilter: (& (osgi.ws=win32) (osgi.os=win32) (osgi.arch=x86))

The Framework supports filtering on the following system properties:
* osgi.nl - the platform language setting.
* osgi.os - the platform operating system.
* osgi.arch - the platform architecture.
* osgi.ws - the platform windowing system


Above example specify that, this bundle can only be resolved if the platform properties are osgi.ws=win32 and osgi.os=win32 and osgi.arch=x86. In other words a platform running on an x86 architecture, using a win32 operating system and the win32 windowing system.

We can find this property directly in plugin.xml file "Overview" tab.