3 Replies Latest reply on Apr 26, 2013 2:55 PM by User731477-Oracle

    Process.exitValue() only returns the low byte of the exit code?

      Hi - I'm executing a subprocess and then waiting for it to return, and then examining the exit code of the subprocess. The error the subprocess returns is 0xb03, but exitValue() only sees 0x03. Further testing shows that if I return 0xbff from my native process, exitValue() or waitFor() will only return 0xff. I expanded this further to return 0xfffffbff, and sure enough, the Process methods only return 0xff.

      Anyone know what the deal is here? The return type for exitValue() and waitFor() are both 'int', so it seems reasonable to be able to return values up to 0xffffffff. Is there a way to set this up to sue the full int?

      Thanks for any insight.