่ทณ่‡ณไธป่ฆๅ†…ๅฎน

๐Ÿ‘ฉโ€๐Ÿ’ป ๆœๅฐ‹ class ไพ†่‡ชๅ“ชๅ€‹ jar

็’ฐๅขƒโ€‹

OS: windows11

power shell

็”จ้€”โ€‹

ไฝฟ็”จ class name ๆœๅฐ‹้€™ๅ€‹ class ไพ†่‡ช็›ฎ้Œ„ๅบ•ไธ‹ๅ“ชๅ€‹ jar

  • ๅ…ˆ็งปๅ‹•ๅˆฐ็›ฎ้Œ„
cd [็›ฎ้Œ„]
Get-ChildItem -Recurse -Filter "*.jar" | ForEach-Object {
$jarFile = $_.FullName
$result = jar tf $jarFile 2>&1 | Select-String -Pattern "[class name].class"
if ($result) {
Write-Host "Found in $jarFile"
}
}