Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ve-dev] Classpath of target VM


Hi,

There are two different possibilities for you to force something to be at the front of the bootpath. One needs to be done by each user for each project, the other can be used if you are supplying extension code and a Classpath Container to the VE. The second one is best if you are supplying it because then your users won't need to do anything special.

For the user:

I haven't tried it specifically for what you want, but we do have an option to create a Launch Configuration for a project that will be used when the remote vm is launched.

To activate this you need to activate the "Proxy Tools".
  1. This is done through Window->Customize Perspective, select the "Commands" tab, search for "Proxy Tools" on the list on the left and select the check box and hit OK.
  2. This adds a new "Run" icon to the toolbar. Its tooltip will say "Proxy Launch Manager". Click on the little dropdown arrow and select Proxy...
  3. Select the "Local Proxy Application", and hit New to create a new one. You can then configure this for a particular project, and go to the "Classpath" tab and add your jar to the bootpath. Do Apply and close.
  4. Select the project, bring up popup menu, select "Configure Default Proxy Configuration..." and select the checkbox for the launch configuration and hit OK.

It will now use this launch configuration for this project.

For the Classpath Container:

You will need to have read  http://eclipse.org/articles/Article-VE-Custom-Widget/customwidget.html  to understand what I'm talking about. But if you now have a Classpath container for your customized jar(s), you can contribute a jem IConfigurationContributor to allow you to contribute to the classpath. This is contributed as an org.eclipse.jem.proxy.contributors extension point from your plugin.xml for the plugin that you are using to control your contribution with the VE.

The IConfigurationContributor will be called in the method contributeClasspaths. It is passed an IConfigurationContributionController instance. and this class is used to contribute to the classpath. You would call the contributeClasspath method with the location to use and with the flag PREPEND_BOOTPATH. This will pre-pend it to the boot classpath.

Thanks,
Rich

Back to the top