document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. ackage javaprolog;
  2.  
  3. import jpl.Query;
  4.  
  5. /**
  6.  *
  7.  * @author : Joel Fernandez
  8.  * @Web    : www.codebotic.com
  9.  * @Tema   : Conectar Prolog con Java
  10.  */
  11. public class JavaProlog {
  12.  
  13.     public static void main(String[] args) {
  14.        
  15.         String t1 = "consult(\'archivo.pl\')";//aqui colocan el nombre de su archivo a compilar
  16.         Query q1 = new Query(t1);
  17.         System.out.println(t1 + " " + (q1.hasSolution() ? "verdadero" : "fallo")); //mostrara mensaje  si hay o no conexion
  18.        
  19.     }
  20.    
  21. }
');