Search code examples
eclipseeclipse-rcpp2tycho

Eclipse product configuration: Setting launcherArgs for "arch"


The eclipse product configuration has the section "launcherArgs" which can be specified globally or for any supported platform. We build our product for win32 as x86 and x86_64 and I want to have a different .ini generated depending on the arch property. To be specific: It´s an in-house application and the JVMs are rolled out to the same directory on every client, but differs between 32bit and 64bit machines.

We build with maven/tycho.


Solution

  • It can be achieved in the p2.inf advice file using these keywords:

    filter=(&(osgi.os=win32)(osgi.arch=x86_64)) instructions.configure=setProgramProperty(propName:-vm,propValue:64bitVM)

    It´s actually not that easy and the correct syntax of the p2.inf file remains a miracle to me. But somehow I got this working. A look to the content.xml file can be helpful if anyone also want´s to do stuff in the p2.inf file...