Advertisement
ferseg

jpl

Aug 17th, 2015
5,697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.51 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement