private static String jarFileName ( ) { // do this first so we can access extractor, ok to invoke more than once createExtractor ( ) ; // get <name> from path/<name>.jar String fullyQualifiedFileName = extractor . container . getName ( ) ; int lastSeparator = fullyQualifiedFileName . lastIndexOf ( File . separatorChar ) ; String simpleFileName = fullyQualifiedFileName . substring ( lastSeparator + 1 ) ; int dotIdx = simpleFileName . lastIndexOf ( ' ' ) ; if ( dotIdx != - 1 ) { return simpleFileName . substring ( 0 , simpleFileName . lastIndexOf ( ' ' ) ) ; } return simpleFileName ; }
Return jar file name from input archive