[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] programmatically recognizing that a file is a bundle?

Reading the manifest is unfortunately the only way to identify a bundle. If
you were to try to install it, then more trouble would occur :-)
If you can not depend on the p2 metadata generator, you can still get
inspiration from the BundleDescriptionFactory#getBundleDescription(File)



  From:       Susan Franklin McCourt <susan_franklin@xxxxxxxxxx>                                                                        
  To:         equinox-dev@xxxxxxxxxxx                                                                                                   
  Date:       03/03/2008 07:46 PM                                                                                                       
  Subject:    [equinox-dev] programmatically recognizing that a file is a bundle?                                                       

I have a user workflow where I want to treat a jar file that is a bundle
differently than I treat a jar file that is just some archive of stuff.
Is there a definitive way that I should programmatically examine a jar file
and decide "this is a bundle."

I thought this would be relatively easy to find, but it wasn't obvious to
me. If there's code to steal, can someone point me to it?

Simon suggested I might crack it open and look in the manifest header for
the Bundle-SymbolicName.
I was hoping there was something more definitive, like, try to create a
bundle from a file and it will throw some exception if it's not a bundle.

equinox-dev mailing list