Jlinker problem with getting a string from lisp

[email protected] Sat, 25 Mar 2006 05:02:00 +0000
Newsgroups gmane.lisp.allegro
Message-ID <[email protected]>
Hi, I am new to using Jlinker, and indeed LISP. I want to use Jlinker to access
LISP from Java, but am having problems getting started.

I'm trying to adapt the example in examples/jlinker/basic, where in the java:

	LispCall x = new LispCall("test-work");
	x.addArg(100);
	if ( 0<x.call() )
	  {
	    System.out.println( "Value came back = " + x.intValue() );
	  }

to call the function test-work. I can get that working fine. But now I have
adapted it to try to perform (fact:get_all_concepts) which should return
something along the lines of ((:TOP) (:BOTTOM)), so my version is:

	LispCall x = new LispCall("fact:get_all_concepts");
	if ( 0<x.call() )
	  {
	    System.out.println( "Value came back = " + x.stringValue() );
	  }

unfortunately I get a java.lang.UnsupportedOperationException: stringValue of
Lisp-Pointer. After messing about a lot with TranStruct I've managed to extract
the word CONS, perhaps something to do with it being a list.

Anyway any help would be much appreciated. I would be perfectly happy with just
being able to pass in raw LISP from Java, and receive raw text to Java as if I
had typed the LISP myself. If there are any nicely documented extra jlinker
examples / wrapper files I could look at they would be great too.

Thanks very much

Greg Martin