jpl.JRef usage
- From: "levilista@xxxxxxxxx" <levilista@xxxxxxxxx>
- Date: Sun, 25 May 2008 13:21:12 -0700 (PDT)
I tried to call a method of an object from JPL ("k" would print out
some text, just for testing):
Kiiro k = new Kiiro();
new Query(":- use_module(library(jpl)).");
jpl.JRef jref = new JRef(k);
q1 = new Query("jpl_call("+jref+",kiir,[],_).");
error message:
Exception in thread "main" jpl.PrologException: PrologException:
error(syntax_error(operator_expected),
string('jpl_call(Kiiro@19b49e6,kiir,[],_). . ', 14))
at jpl.Query.get1(Query.java:338)
at jpl.Query.getSubstWithNameVars(Query.java:388)
at jpl.Util.textToTerm(Util.java:163)
at jpl.Query.<init>(Query.java:198)
at Prologtojava01.main(Prologtojava01.java:26)
I'm aware, that JRef is for some reason deprecated, but I don't know
why, and what should be used instead (the release notes didn't mention
any changes related to this).
My JPL version is:
6 ?- [jpl_versions_demo].
prolog library version: 3.1.3-alpha
java library version: 3.1.3-alpha
c library version: 3.1.3-alpha
(It came with the latest stable swi release.)
.
- Follow-Ups:
- Re: jpl.JRef usage
- From: levilista@xxxxxxxxx
- Re: jpl.JRef usage
- From: levilista@xxxxxxxxx
- Re: jpl.JRef usage
- Prev by Date: Re: Why Prolog code from Wikipedia doesn't run?
- Next by Date: Re: JPL problem (newbie)
- Previous by thread: Yet another interface to SWI-Prolog in mod_perl
- Next by thread: Re: jpl.JRef usage
- Index(es):