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?
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 whyp.waitfor(5,TimeUnit.SECONDS)
being true would mean that PowerShell is not running/available to run?