profesorfalken / jPowerShell

Simple Java API to interact with PowerShell console
Apache License 2.0
217 stars 84 forks source link

Rationale behind PowerShellNotAvailable Exception? #81

Open lup1 opened 2 years ago

lup1 commented 2 years ago

I am trying to work with the PowerShell.java code, and I kept getting the PowerShellNotAvailable exception. I found that removing the p.waitfor(5,TimeUnit.SECONDS) part of the if statement and the interrupted exception made the errors go away, but my powershell script did not seem to run. Could you explain why p.waitfor(5,TimeUnit.SECONDS) being true would mean that PowerShell is not running/available to run?