• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yuhangch
2.53D
V2EX  ›  程序员

Java process.waitFor() 返回 -1 是哪里出问题了?

  •  
  •   yuhangch ·
    yuhangch · Sep 16, 2020 · 1653 views
    This topic created in 2069 days ago, the information mentioned may be changed or developed.
    找到篇博客,状态码里没找到-1,求 v 友解答
    2 replies    2020-09-16 16:57:32 +08:00
    yuhangch
        1
    yuhangch  
    OP
       Sep 16, 2020
    windows 平台。。。
    coolcfan
        2
    coolcfan  
       Sep 16, 2020
    这个返回值是你运行的那个程序返回的吧……

    > the exit value of the subprocess represented by this Process object. By convention, the value 0 indicates normal termination.

    非 0 值代表有问题,但是具体什么数字代表什么问题,感觉每个程序都不一样的
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2877 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 11:01 · PVG 19:01 · LAX 04:01 · JFK 07:01
    ♥ Do have faith in what you're doing.