V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yuhangch
2.53D
V2EX  ›  程序员

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

  •  
  •   yuhangch ·
    yuhangch · Sep 16, 2020 · 1618 views
    This topic created in 2049 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   ·   5449 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 34ms · UTC 05:56 · PVG 13:56 · LAX 22:56 · JFK 01:56
    ♥ Do have faith in what you're doing.