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

Alessio Stalla alessiostalla at gmail.com
Tue Jan 12 18:42:52 UTC 2010


On Tue, Jan 12, 2010 at 12:56 PM, Mark Evenson <evenson at panix.com> wrote:
> 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.

I don't agree on point 2. Ideally I would like to keep the two points
distinct, i.e. cook up another pseudo-pathname - say,
"classpath:/a/b/foo.abcl" - specifically for classpath resources. The
reason is that I see two very distinct usages of this functionality:

2. (classpath) is what applications would normally use: just ensure
that resources are in the classpath, ignore where they are physically
located;
1. (explicit jar path) would normally be used by ABCL itself in order
to correctly resolve relative paths, load internal stuff, and similar.

imho, of course.

Bye,
Alessio




More information about the armedbear-devel mailing list