V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
yuhangch
V2EX  ›  程序员

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

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

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

    非 0 值代表有问题,但是具体什么数字代表什么问题,感觉每个程序都不一样的
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3240 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 12:14 · PVG 20:14 · LAX 05:14 · JFK 08:14
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.