[armedbear-devel] Folding Lisp application code into a JAR file in the Java CLASSPATH

Mark Evenson evenson at panix.com
Tue Jan 12 11:56:07 UTC 2010


On 1/12/10 5:07 AM, Olsen, Peter C. wrote:
> Ladies and Gentlemen,
>
> Is there an elegant way to have ABCL load Lisp code from a JAR file in the
> Java CLASSPATH?

Unfortunately, not yet.

As it stands, "naked" ABCL really doesn't interact with the Java 
CLASSPATH in any meaningful way for Lisp objects.

Once I get the the JAR file support working again, I could easily add 
the following meaning to

   CL-USER> (load "jar:file:foo.jar!/a/b/bar.abcl")

1.  Resolve "foo.jar" with respect to *DEFAULT-PATHNAME-DEFAULTS*, and 
if it exists, attempt to load "a/b/bar.abcl".

2.  If resolution of "foo.jar" fails on the filesystem, iterate through 
the CLASSPATH to match the name.

Alan Ruttenberg's [JSS][1] has long had the ability to dynamically add 
JARs to the JVM CLASSPATH which would be nice to incorporate as well.

[1]:  http://mumble.net:8080/svn/lsw/trunk/jss/


>
> I'm helping build an application to run under ABCL and I'd like to take all
> the code and roll it up into a JAR file in the CLASSPATH when I start the
> interpreter.  If possible I'd then like to have ABCL find the file as though
> it were in the current directory.  I know that ABLC is finding its system
> files in abcl.jar and I can load Lisp code from a local JAR file, but I
> haven't figured out how to put the two together and load Lisp elegantly from
> a JAR file in the CLASSPATH.  I can do it inelegantly by getting the
> CLASSPATH from the Java System class, inspecting all its JAR files, then
> loading the right ones manually, but that seems awkward for a customer
> application.
>[…]

It certainly should be a lot smoother by default.

-- 
"A screaming comes across the sky.  It has happened before, but there
is nothing to compare to it now."




More information about the armedbear-devel mailing list