oops~ it blocks when i call external program in java >_<
why?
go to the jdk Runtime doc:
引用
the created subprocess does not have its own terminal or console.
引用
Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.
here it is!!! the external need somewhere to output something, or it will block.
so, two ways to fix it.
1. grab the output/error stream in your program.
2. call external program through cmd, using cmd /c start ...
分享到:
相关推荐
In try block we write those code which can throw exception while code execution and when the exception is thrown it is caught inside the catch block. Multiple try catch We can have more than one try/...
your program to use IMAP instead of POP and expect everything in IMAP to be supported. Assuming your mail server supports IMAP, your JavaMail-based program can take Fundamentals of the JavaMail API...
- FIX: Close query twice when program closing with modified documents. - ADD Added editing form for TBackgroundOptionsProp property in the FlexEdit/FlexEditSE projects. Version 1.6 ----------- - ...
Later is supported when map2dbg.exe tool is placed in \Bin folder of EurekaLog installation (separate download is required) 5)....Added: Exception2HRESULT in EAppDLL to simplify developing DLLs with ...
- **Getting Values into the Program**: Discussion on how to read values from external sources, such as keyboard input, and store them in variables. #### Writing a Program This section provides ...
- When x86-64 support is compiled in, you could enable/disable long mode 1G pages support without recompile using new CPUID option in .bochsrc. Configure options: --enable-mmx, --enable-sse, --...
A stack is an area of memory in which program procedure or function call addresses and parameters are temporarily stored. In Process To run in the same address space. In-process servers are loaded ...
The rsc_bin column of master..syslockinfo contains the resource block in hexadecimal format. For an example of how to decode value from this column using the information above, let us assume we have ...
all developers having contributed (When no name is given, the change is by F. Piette). I can't list all contributors here but I want to specially thanks two specially active contributors: - Arno ...
- **Built-In and Third-Party Modules:** Python includes many built-in modules, such as math and datetime, and supports third-party modules through external libraries like NumPy and Pandas. **Files ...
C THE COMMON BLOCK /DATA/. SEE OCCAM HEADER. C INPUTM(FILENAME), TAKES THE NAMED FILE AND READS IN ANY FIXED ATTRIBUTES C OF THE MODEL, SUCH AS LAYER THICKNESSES, FINITE ELEMENT MESH, ETC. ...