Java Jar Manifest getBundleVersion(Manifest manifest)

Here you can find the source of getBundleVersion(Manifest manifest)

Description

get Bundle Version

License

Open Source License

Declaration

public static String getBundleVersion(Manifest manifest) 

Method Source Code

//package com.java2s;
// %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt

import java.util.jar.Attributes;

import java.util.jar.Manifest;

public class Main {
    public static String getBundleVersion(Manifest manifest) {
        if (manifest == null) {
            return null;
        }/*  w w w.  java2 s  .  co m*/
        Attributes mainAttributes = manifest.getMainAttributes();
        if (mainAttributes == null) {
            return null;
        }
        return mainAttributes.getValue("Bundle-Version"); //$NON-NLS-1$
    }
}

Related

  1. formatDisplay(String src, Manifest manifest)
  2. generateEmptyManifest()
  3. getAttribute(final Manifest manifest, final String name, final String defValue)
  4. getAttribute(String attributeName, Manifest manifest)
  5. getBundleClassPath(Manifest manifest)
  6. getHeader(String name, Manifest manifest)
  7. getMainAttributeValue(Manifest manifest, String attribute)
  8. getManifest()
  9. getManifest()