command line - SWI-Prolog file executing through Java -


i want run swi-prolog java file. want read text.pl file , write output in output.txt file. how can that? i'm not pretty sure of did here if correct or not. i'm not familiar command line calling. java code:

public class example {          public static void main(string[] args)          {             systemcommandsrunner scr = new systemcommandsrunner();             scr.runcommand("swipl -f input.pl < input.pl > output.txt");          } } 

you can use runtime.getruntime().exec("swipl -f input.pl < input.pl > output.txt");


Comments

Popular posts from this blog

php - Why I am getting the Error "Commands out of sync; you can't run this command now" -

ruby - Nesting modules inside of a Rails eninge gem -

Eclipse formatter for java ending braces -