I'll look at this, and try to replace the code I just commited bu something using this.
Sylvain.
On Mon, 2005-03-14 at 18:05 +0100, Manfred Geiler wrote:
Sylvain Vieujot schrieb:
> By the way, does someone know how to get the Implementation Version from
> the jar file ?
> I used implementationHash =
> AddResource.class.getPackage().getImplementationVersion().hashCode();
> but the getImplementationVersion return null.
You mean the ImplementationVersion from the Manifest?
Try to get the META-INF/MANIFEST.MF file through an InputStream. Have a
look at the FacesConfigurator. It does something similar for
"META-INF/faces-config.xml".
Once you have the InputStream try the following:
Manifest manifest = new Manifest(is);
Attributes attributes = manifest.getAttributes("myfaces.apache.org");
version = attributes.getValue(Attributes.Name.IMPLEMENTATION_VERSION);
HTH,
Manfred
