It's almost xmas, so I thought I should point you at the Java wrapping for newlisp, using JNI that I just cleaned up. You'll need to compile it, probably after adapting the Makefile to your set up.
http://www.realthing.com.au/files/newli ... sp-jni.tgz
It's all nicely self-documenting code (hah!), and it provides what I thought of as the bare essentials for running newlisp under/in Java. I'm afraid the callback solution is different from the (emerging) "standard", mostly because I didn't feel like wading through all the type variants for boxing.
It is made on and for 32 bit linux (xubuntu 12.04) using newlisp 10.6.2 and openJDK 1.6.
It might port to other platforms.
enjoy.
Java 6 JNI wrapper importing newlisp
-
- Posts: 228
- Joined: Mon Jun 02, 2014 1:40 am
- Location: Melbourne, Australia
Re: Java 6 JNI wrapper importing newlisp
Thanks Ralph, people have been asking for this. I have put a link on the http://www.newlisp.org/index.cgi?Code_Contributions page in the last group Foreign applications support and also added a README.txt with the text of your post.
-
- Posts: 228
- Joined: Mon Jun 02, 2014 1:40 am
- Location: Melbourne, Australia
Re: Java 6 JNI wrapper importing newlisp
Great.
After the first upload, I've now also "polluted" the tgz with a simple Java GUI that offers a command loop a bit like a console -- as an example of use. An actual console is better of course, but I freshened up on some Java tidbits.
Thanks for your great work.
After the first upload, I've now also "polluted" the tgz with a simple Java GUI that offers a command loop a bit like a console -- as an example of use. An actual console is better of course, but I freshened up on some Java tidbits.
Thanks for your great work.
-
- Posts: 228
- Joined: Mon Jun 02, 2014 1:40 am
- Location: Melbourne, Australia
Re: Java 6 JNI wrapper importing newlisp
I couldn't resist another minor revision: a slight change to the Java side to prohibit any attempt of re-entry into newlisp from a callback, and then the various changes required to let callbacks return strings (as otherwise the callbacks can't provide data to newlisp).
Dated 2014-11-10.
Dated 2014-11-10.
Re: Java 6 JNI wrapper importing newlisp
Thanks Ralph, updated again here: http://www.newlisp.org/index.cgi?Code_Contributions