The solution that I found is to configure the JRE on which the plug-in runs.
To find the JRE on which your plug-in runs, you first need to find the execution environment of your plug-in. Open the MANIFEST.MF
file of the plug-in and find the execution environment that the Bundle-RequiredExecutionEnvironment
attribute is set to, e.g., JavaSE-1.6
.
In Eclipse, each execution environment is mapped to a JRE installation. To find the JRE that your execution environment is set to go to Preferences -> Java -> Installed JREs -> Execution Environments
and click on the execution environment used by your plug-in.
You need to configure the JRE on which your plug-in runs. Go to Preferences -> Java -> Installed JREs
and select the JRE used by your plug-in. Press the Edit...
button and set the Default VM arguments
to -Xbootclasspath/p:/path/to/your/jar.jar
. Finally, click the Finish
button and then the OK
button on the preferences window.
You may be able to set the VM arguments in different places, e.g., on the launch configuration dialog of your Eclipse Application.