loading lisp files from inside the java jar

Mark Evenson evenson at panix.com
Tue Aug 18 12:17:26 UTC 2015


> On Aug 18, 2015, at 13:35, Hamda Binte Ajmal <hamda.binte.ajmal at gmail.com> wrote:
> 
> To be more specific
> 
> The load statement looks like
> (load "jar:file:C:/Users/Administrator.NUIG-1Z7HN12/Documents/NetBeansProjects/Interface/dist/Profet.jar!/aima/quicklisp/setup.lisp")
> 
> and the error thrown is
> 
> "Unhandled lisp condition: Can't ensure directory
>  #P"jar:file:C:/Users/Administrator.NUIG-1Z7HN12/Documents/NetBeansProjects/Interface/dist/Profet.jar!/./" 
> ancestor of
>   #P"jar:file:C:/Users/Administrator.NUIG-1Z7HN12/Documents/NetBeansProjects/Interface/dist/Profet.jar!/cache/asdf-fasls/07y1rt/asdf.abcl"."


[On the road until later today so just a brief reply]

I think you *are* loading setup.lisp from the jar, and that it contains load-time code that is producing these errors.  To verify that this is indeed the case, I would suggest creating a file with a very simple form, such as 

    (format t “Hello Jar World!~&”) 

to see if that indeed loads.  Then, you know you are successfully loading lisp code from a jar, so what remains is to figure out what the problem is when the rest of your code executes within the jar.

I believe that your error is the result of ASDF attempting to write a fasl in the jar, which is odd as ASDF has ABCL-specific code which should creates the necessary output translation from a jar (which is not a valid target of writes) to the local filesystem.  What’s odd here is that you seem to be using a different version of “asdf.lisp” than what ships with ABCL.  Or is this Quicklisp attempting to install ASDF?  

Any chance of getting a build recipe for the JAR file you are creating here?  Or, barring that, putting a binary up somewhere to inspect?

Setting CL:*LOAD-VERBOSE* to t in ~/.abclrc can also help you get idea of what is being loaded.

Back later,
Mark

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





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/armedbear-devel/attachments/20150818/1080c315/attachment.html>


More information about the armedbear-devel mailing list