jar のアーカイブを消去するスクリプトを Python で作成しました ( Class Dependency Analyzerで必要なクラスを知っています)。これは私のスクリプトです。
def deleteJarEntrie(pJarPath) :
    # Dictionary contains className of jar file for key 
    # and a list of class for value
    for key in myDict.keys():
        zin = zipfile.ZipFile (pJarPath+key, 'r')
        zout = zipfile.ZipFile (key, 'w')
        # for each entry in zip file
        for item in zin.infolist():
            # if the className of the file finished by one “/” it is a directory 
            # thus I do not reiterate values of the dictionary  
            if (item.filename[-1:] != "/"):
                # For each value of my dictionary (the value are the classes which I need)
                for value in myDict.get(key):
                    buffer = zin.read(item.filename)
                    className = item.filename.split("/")
                    className = className[len(className)-1]
                    if (item.filename == value):
                        zout.writestr(item, buffer)
                        print item.filename
        zout.close()
        zin.close()'
問題は、item.filename が値としてクラス ファイル名を決してとらないことです。item.filename はディレクトリの値のみをとりますが、MANIFEST.MF の値をとることはできます。
例えば :
/org/test/myClass.class にクラスがあります
-> item.filename = /org/test/
/META-INF/MANIFEST.MF にマニフェストがあります
-> item.filename = /META-INF/MANIFEST.MF
クラスファイルが表示されない理由がわかりません...
回答ありがとうございます。私の英語が正しくない場合は申し訳ありません。