$ErrorActionPreference = 'Stop'
if (-not (Get-Command javac -ErrorAction SilentlyContinue)) {
  Write-Output '{"app":"inventory-manager-java","status":"skip","reason":"javac tidak ditemukan"}'
  exit 0
}
& javac .\InventoryManagerApp.java
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
& java InventoryManagerApp --smoke-test
