check if command was successful in a batch file

前端 未结 5 985
南方客
南方客 2020-12-04 23:56

How within a batch file to check if command

start \"\" javaw -jar %~p0/example.jar

was successful or produced an error?

I want to u

5条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 00:17

    I don't know if javaw will write to the %errorlevel% variable, but it might.

    echo %errorlevel% after you run it directly to see.

    Other than that, you can pipe the output of javaw to a file, then use find to see what the results were. Without knowing the output of it, I can't really help you with that.

提交回复
热议问题