title: Show Prolog "write" output in Console Java
body: <p>I'm using JPL Libraries to link a Prolog program with Java interface. 
  I have a (working) JTextArea where I redirect everything that appears in Console, but I can't see the prolog "write" instruction. 
  I used this method for queries:</p>
  
  <pre><code>Query q2 = new Query(t2);
  System.out.println("Query " + t2 + " is " + (q2.hasSolution()));
  </code></pre>
  
  <p>but when the query is false, the text in "write" parts of Prolog for example:</p>
  
  <pre><code>write('Sorry, you can''t go from the '), write(CurPlace), write(' to the '),    write(Place), nl,
  </code></pre>
  
  <p>doesn't appear in JTextArea. </p>
  
  <p>I tried also with <code>System.out.println("first solution of " + q2 + ": X = " + q2.oneSolution().get("X"));</code> but it doesn't work.  </p>
  
  <p>What happen in JTextArea is this:
  Query goto(garage).
   is false
  but I expected also the "write" warnings contained in .pl file. For example:</p>
  
  <pre><code>write('Sorry, you don''t have the keys')
  </code></pre>