When you say Equinox hook bundle I assume you mean a fragment of
org.eclipse.osgi that provides an adaptor hook implementation.

These types of bundles are loaded very early by the launcher before the
Framework is loaded.  Because of this we have limited support for loading
inner jars from these types of bundles.  It can be done but the bundle that
includes your framework hook implementation must be in a directory bundle
(not jared).  And it must contain a an eclipse.properties file at its root
that includes a property osgi.frameworkClassPath which specifies the inner
jars.  (e.g.  osgi.frameworkClassPath=asm.jar).

This is the legacy way that we load framework extension bundles with hook
implementations and one that we have not documented well because it got
dropped in favor of framework extension bundles for the OSGi specification.
The code at org.eclipse.equinox.launcher.Main.readFrameworkExtensions(URL,
ArrayList) is where the eclipse.properties is read from your equinox hook
bundle (framework extension).  I also suggest you open an enhancement bug
against Equinox to allow for framework extensions with hooks specify the
Bundle-ClassPath manifest header to point to inner jars.  This would allow
you to move off the legacy eclipse.properties file to specify your inner
jar.

Tom




                                                                       
  From:       Craig Setera <[EMAIL PROTECTED]>                      
                                                                       
  To:         equinox-dev@eclipse.org                                  
                                                                       
  Date:       08/09/2008 01:39 PM                                      
                                                                       
  Subject:    [equinox-dev] JAR file references in Equinox Hooks?      
                                                                       





Quite some time ago, I added a classloader hook bundle for my EclipseME
plugin to allow EclipseME to do a bit of rewriting of a JDT class and
provide a hook that I needed to introduce preprocessed source code
handling.  This code has been working for quite some time.  It includes
use of the ASM library packaged as classes within the hook's JAR file.

As this functionality is being ported to the official Eclipse MTJ
project, there is a concern from Eclipse legal concerning packaging the
ASM classes in this way.  In order to pass legal approval, the ASM JAR
file needs to be used as-is.  This leads to my question.  Is it possible
for an Equinox hook bundle to reference a JAR file in the bundle
classpath in some way?  I know at the time that I implemented this
functionality a couple of years ago that I could not get this to work.
My hope is that there is a way and I just wasn't doing things right.

I'd appreciate any insights that the Equinox team can give me on behalf
of the MTJ project.

Thanks,
Craig
_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
equinox-dev mailing list
equinox-dev@eclipse.org
https://dev.eclipse.org/mailman/listinfo/equinox-dev

Reply via email to