title: Java-Prolog wrong Results
body: <p>I made a query with Org.JPL7 in Java, and I tried to do it several times in diferent ways but it gave to me a lot of wrong results. The code in .pl file is the next.</p>
  
  <pre><code>loco(eso,eso1).
  loco(eso3,eso2).
  </code></pre>
  
  <p>and the Java code is the next.</p>
  
  <pre><code>Query q2= new Query(new Compound("loco", new Term[] {new Variable("X")}));
  
      q2.open();
      System.out.println(" "+Consulta1+(q2.next().get("X")));
  </code></pre>
  
  <p>The result:</p>
  
  <pre><code>_0
  </code></pre>
  
  <p>and I try this too.</p>
  
  <pre><code>for (Map soln : new Query("loco(X,Y)")) {
          System.out.println(soln.get("X"));
          }
  </code></pre>
  
  <p>The result:</p>
  
  <pre><code>_2
  </code></pre>
  
  <p>and this...</p>
  
  <pre><code>Query q2= new Query("loco(X,Y)");
      q2.open();
      System.out.println(q2.next().get("X"));
  </code></pre>
  
  <p>The result:</p>
  
  <pre><code>_0
  </code></pre>
  
  <p>I try with "q2.nextSolution()" and "q2.nextElement()" but the results were always the same "_N" where N is any number "0,1,2,3,4" and i don't know why.</p>