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

Reply via email to