Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
約 20 個の jar ファイルを含む ear ファイルがあります。この EAR には、特定の jar ファイル (アプリケーション クラス ファイルを含む jar 1 など) があります。
ここで、EAR 内に存在するその jar (この場合は jar 1) から特定のクラス ファイルを抽出できる unix の単一行コマンドが必要です。
私は2段階でそれを行う方法を見つけました:
必要なファイルを見つけます。
jar tvf file.ear | grep file_you_want.abc
必要なファイルとそのパスを取得します。
それを抽出します:
jar xvf file.ear path/to/file/file.abc