Code example for Manifest

Methods: getMainAttributes, write

0
    // Bundle-ActivationPolicy: lazy 
    // Bundle-RequiredExecutionEnvironment: J2SE-1.5 
    //  
 
    try { 
      manifest.write(new FileOutputStream(file));
    } catch (Exception e) {
      e.printStackTrace();
      throw new RuntimeException(e);
    } 
  } 
 
  /** 
   * <p> 
   * </p> 
   *  
   * @return 
   */ 
  public Manifest getManifest() {
    Manifest manifest = new Manifest();
    Attributes attributes = manifest.getMainAttributes();
 
    attributes.putValue("Manifest-Version", "1.0");
    attributes.putValue("Bundle-ManifestVersion", "2");
 
    attributes.putValue("Bundle-SymbolicName", this._bundleSymbolicName);