V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
yuhangch
2.53D
V2EX  ›  程序员

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

  •  
  •   yuhangch ·
    yuhangch · 2020 年 9 月 16 日 · 1534 次点击
    这是一个创建于 1965 天前的主题,其中的信息可能已经有所发展或是发生改变。
    找到篇博客,状态码里没找到-1,求 v 友解答
    2 条回复    2020-09-16 16:57:32 +08:00
    yuhangch
        1
    yuhangch  
    OP
       2020 年 9 月 16 日
    windows 平台。。。
    coolcfan
        2
    coolcfan  
       2020 年 9 月 16 日
    这个返回值是你运行的那个程序返回的吧……

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

    非 0 值代表有问题,但是具体什么数字代表什么问题,感觉每个程序都不一样的
    关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   4679 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 06:03 · PVG 14:03 · LAX 22:03 · JFK 01:03
    ♥ Do have faith in what you're doing.