Error calling Java and Flora2

0 views
Skip to first unread message

Miss Veev

unread,
Nov 30, 2018, 11:32:47 PM11/30/18
to ErgoAI, Flora-2, and XSB Users Forum
I'm trying to connect Java to flora2 but I got lost, following the example, I tried adding the jar file was getting error also there was an error with Javac Flora_setting.sh please I need help

Miguel Calejo

unread,
Dec 1, 2018, 2:31:21 AM12/1/18
to Miss Veev, ErgoAI, Flora-2, and XSB Users Forum
Please send the error log you’re getting, otherwise it”s very hard to help you

> On 1 Dec 2018, at 04:32, Miss Veev <vivianp...@gmail.com> wrote:
>
> I'm trying to connect Java to flora2 but I got lost, following the example, I tried adding the jar file was getting error also there was an error with Javac Flora_setting.sh please I need help
>
> --
> You received this message because you are subscribed to the Google Groups "ErgoAI, Flora-2, and XSB Users Forum" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB...@coherentknowledge.com.
> To post to this group, send email to ErgoAI-Flor...@coherentknowledge.com.
> Visit this group at https://groups.google.com/a/coherentknowledge.com/group/ErgoAI-Flora2-XSB-forum/.
> To view this discussion on the web visit https://groups.google.com/a/coherentknowledge.com/d/msgid/ErgoAI-Flora2-XSB-forum/0b114e90-0da8-4278-80c8-9026a0c6fda3%40coherentknowledge.com.

Michael Kifer

unread,
Dec 1, 2018, 2:50:31 AM12/1/18
to ErgoAI, Flora-2, and XSB Users Forum

You did not provide any details.
It might be useful for you to look at the Ergo Example Bank, which contains a running example.
Look it up on the Ergo Documentation page.

Miss Veev

unread,
Dec 1, 2018, 10:06:19 AM12/1/18
to Michael Kifer, ErgoAI, Flora-2, and XSB Users Forum
I don't understand this part

--
You received this message because you are subscribed to the Google Groups "ErgoAI, Flora-2, and XSB Users Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ErgoAI-Flora2-XSB...@coherentknowledge.com.
To post to this group, send email to ErgoAI-Flor...@coherentknowledge.com.
Visit this group at https://groups.google.com/a/coherentknowledge.com/group/ErgoAI-Flora2-XSB-forum/.
20181201_165447.jpg

Michael Kifer

unread,
Dec 1, 2018, 9:03:47 PM12/1/18
to ErgoAI, Flora-2, and XSB Users Forum, michae...@coherentknowledge.com


On Saturday, December 1, 2018 at 10:06:19 AM UTC-5, Miss Veev wrote:
I don't understand this part

Which part exactly?  The compilation command?

java -DPROLOGDIR=%PROLOGDIR%
                -DFLORADIR=%FLORADIR%
                -classpath %MYCLASSPATH% flogicbasicsExample

The API expects two Java properties, PROLOGDIR and FLORADIR. These can be set either on command line, as shown above with -D, or using setProperty in your Java program. In the latter case, no need for the -D parameters.
If you do set them on command line, you need to supply  -DPROLOGDIR=path-to-prolog-bindir  and -DFLORADIR=path-to-flora-dir, where you have to replace the italics with the actual stuff.  The above command does the same with the help of cmd variables, which can be set using the shell script flora_settings.bat.

As I suggested before, you can take a look at the ErgoAI example bank https://docs.google.com/document/d/15ZKCWJKUdiFK1M0cvE15uJWWAYgFR1CLVRylRpO1g7s
This has a concrete runnable example with all the concrete compilation/run commands that you need, including the classpath parameter.
Reply all
Reply to author
Forward
0 new messages