[armedbear-devel] newbie question

Alessio Stalla alessiostalla at gmail.com
Wed Feb 16 10:51:12 UTC 2011

On Wed, Feb 16, 2011 at 11:30 AM, Pascal J. Bourguignon
<pjb at informatimago.com> wrote:
> Lukas Georgieff
> <lukas.georgieff at hotmail.com> writes:
>> Hi,
>> I am new to ABCL and have a question to it's capabilities:
>> My goal is to load an exsting part of a system coded in lisp into Java and to use the lisp code as basic library for a java application.
>> Currently my approach is to load the lisp code with:
>> Interpreter interpreter = Interpreter.createInstance();
>> interpreter.eval("(load \"my-lisp-code.lisp\")");
>> ...
>> So the lisp code must be present in the project every time it is
>> running.  Is there any chance to translate the lisp code to a Java
>> source file by using ABCL? So it would not be necessary to provide the
>> lisp code in the java application after it is translated once.
> Once compiled, the lisp code is provided as a .class file.

That's incorrect. It is provided as a distinct .abcl file for each
.lisp file, which is a zip containing a text file (generated from the
top-level forms in the .lisp file) + a .cls file for each function
(top-level or non-inlined local) in the .lisp file. .cls files are in
JVM class file format, but they're not loadable as-is because they
don't obey the JVM naming conventions (they ought to be ending in
.class and placed in a org/armedbear/lisp/ directory).
What you *can* do is package .abcl files in a .jar file and use ASDF
to load them with a single function call.


More information about the armedbear-devel mailing list