Note that there are some explanatory texts on larger screens.

plurals
  1. POJava Process stops in the middle of the process
    primarykey
    data
    text
    <p>I've been trying to google this around for quite a while now, without any success. I'm hoping to get my issue solved here. <br><b>First function: </b></p> <pre><code>public void startTFServer(Channel c) { try { ProcessBuilder procBuilder = new ProcessBuilder("tfs.exe"); procBuilder.redirectErrorStream(); Process proc = null; System.out.println(Runtime.getRuntime().freeMemory()); proc = procBuilder.start(); System.out.println(Runtime.getRuntime().freeMemory()); StreamGobbler gobbler = new StreamGobbler(proc.getInputStream(), "STD_OUT"); gobbler.start(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } } </code></pre> <p><b>The thread that captures the process output:</b><br /></p> <pre><code>private class StreamGobbler extends Thread { InputStream is; String type; private StreamGobbler(InputStream is, String type) { this.is = is; this.type = type; } @Override public void run() { try { InputStreamReader isr = new InputStreamReader(is); BufferedReader br = new BufferedReader(isr); String line = null; while ((line = br.readLine()) != null) { System.out.println(type + "&gt; " + line); } } catch (IOException ioe) { ioe.printStackTrace(); } } } </code></pre> <p><b>The problem: </b> When running the application the input interrupts at the same place every time. The application I'm running with the "Process class" is a server that required quite some memory to run, can this be one of the reasons for why the process won't finish loading my app? I was thinking that the memory would run out, but I can't really diagnostise it.</p> <p>Any help would be greatly appreciated!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload