public static String extractSymbolicName ( File jar ) throws PluginExecutionException { JarFile jarFile = null ; try { jarFile = new JarFile ( jar ) ; return jarFile . getManifest ( ) . getMainAttributes ( ) . getValue ( "Bundle-SymbolicName" ) ; } catch ( IOException e ) { throw new PluginExecutionException ( "Could not load the jar " + jar . getAbsolutePath ( ) , e ) ; } finally { if ( jarFile != null ) { try { jarFile . close ( ) ; } catch ( IOException e ) { // nothing to do here } } } }
Extracts the bundle symbolic name from the jar manifest .