Can I pass a Prolog variable to a Java method, and let the Java method instantiate the variable?

No. Prolog variables cannot be passed to a Java method. You should have the Java method return a value, and have your Prolog program instantiate the variable. If you want a Java method to return multiple values, you should let the Java method store the values in the member variables of the enclosing object, and let Prolog use javaGetField in order to get the values.



Neng-Fa Zhou 2013-01-25