Re: send a message FROM prolog TO java
Sergio Castro <[email protected]> Sat, 3 May 2014 12:07:42 -0700 (PDT)
| Newsgroups | gmane.comp.ai.prolog.swi |
|---|---|
| Message-ID | <[email protected]> |
Hi Destiny, Not sure if I understand exactly what is your problem, but it seems to me that what you want to know is how to pass arrays between Prolog and Java using JPL ? There is an example about that in the JPL user guide: http://www.swi-prolog.org/packages/jpl/prolog_api/overview.html Take a look to the example under: "a slightly longer example" section. You may also find useful the utility predicates described in: http://www.swi-prolog.org/packages/jpl/prolog_api/api.html Particularly, jpl_datums_to_array/2. Hope it helps, cheers, Sergio Le Jeudi 1 mai 2014 19h15, Destiny Anyaiwe <[email protected]> a écrit : I never knew I will come calling so soon, my apologies, though I have been >having fun with JPL for the past 3 days. In the middle of my JPL usage and >applications I found out the followings > >*BackGround of problem/question == * I have a java program that runs well >in the Sorting of an array numbers, these array of numbers can be hard >coded or given to java at execution time. > > >*My INTENTIONS==* I want to feed my Sort.java program with an array of >numbers from Prolog, then Sort.java does the sorting and feeds my sort.p >Prolog program the sorted result for exhibition. > >*QUESTIONS:::* Since each new array I give from sort.pl to Sort.java, >requires the Sort.java to run how do I make the code in Prolog (sort.pl) >for the Sort.java to automatically get the unsorted array, run and feed my >sort.pl the result with out me going to eclipse to pull-up/receive the >array and then run the java program? > >I have been doing it bit by bit and manually which is so timid! I would >rather love to have a Prolog program of codes to *automatically* >1) send the array >2) ignite or cause Java to run for that particular array >3) get the resulting sorted array from java >4) write/print sorted result > >Thanks and most humbly appreciate any form of assistance and guides. > >Regards >Destiny >-------------- next part -------------- >HTML attachment scrubbed and removed >_______________________________________________ >SWI-Prolog mailing list >[email protected] >https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog > > > -------------- next part -------------- HTML attachment scrubbed and removed