$ErrorActionPreference = 'Stop'
if (-not (Get-Command javac -ErrorAction SilentlyContinue)) {
  throw 'javac tidak ditemukan.'
}
& javac .\InventoryManagerApp.java
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }
& java InventoryManagerApp
