JPL 3.x Prolog API gotchas


calling methods with no parameters

you must pass an empty parameter list when calling Java methods which take no parameters, e.g.
jpl_call('java.lang.System', gc, [], _)

calling void methods

you must accept an @(void) result when calling void Java methods, e.g. either
jpl_call('java.lang.System', gc, [], @(void))
which explicitly matches the expected result, or
jpl_call('java.lang.System', gc, [], _)
which uses an anonymous variable to ignore the result.

(more to come...)


Paul Singleton
drafted Wednesday 4th February 2004