[
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?
|
oh, i didn't want to install it. I was thinking something like
Bundle(File) throws NotABundleException
would have been cool ;-)
thanks for the pointer, I was actually crawling through Framework and other equinox base stuff not thinking about the fact that the metadata generator has to make the same kind of decision...
susan
Pascal Rapicault <Pascal_Rapicault@xxxxxxxxxx>
![]()
| ![]()
| ![]()
To: Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc: equinox-dev@xxxxxxxxxxx, equinox-dev-bounces@xxxxxxxxxxx
Subject: 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)
HTH,
PaScaL
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.
;-)
susan_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev
![GIF image](gifklANMXtVru.gif)
![GIF image](gifSorCxfp4q2.gif)
![GIF image](gifKHfT3BwCLl.gif)