<div dir="ltr">Hi,<div>I was working on an application, that loads a few lisp files using lisp command</div><div>(load "fullfilepath.lisp") from java using ABCL.</div><div>This file in turn loads the other lisp files located in same folder hierarchy, and then i call lisp functions (defined in these files) from java and everything works perfect as long as I run the application from Netbeans.</div><div>Close to deployment, I tested the application by running it from jar file, I found that there are issues with filepaths, as the files are not a part of file-system, and henceĀ <span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:13px;line-height:16.8999996185303px">not accessible using a file-path.</span></div><div><font face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.8999996185303px">Does anyone has any idea how to fix this issue ?</span></font></div><div><font face="Helvetica Neue, Helvetica, Arial, sans-serif"><span style="line-height:16.8999996185303px">I tried many things, likeĀ </span></font></div><div><pre class="lang-java prettyprint prettyprinted" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">URL url </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">LispConnector</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="kwd" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">class</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">getResource</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="str" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"/Aima/aima/quicklisp/setup.lisp"</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">);</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">String</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> path </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> url</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">getFile</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">();</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">File</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> f </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="kwd" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">new</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">File</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">path</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">);</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
path </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> f</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">getAbsolutePath</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">();</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
path </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> path</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">replace</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="str" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"\\"</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">,</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="str" style="margin:0px;padding:0px;border:0px;color:rgb(128,0,0)">"/"</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">);</span></code></pre><pre class="lang-java prettyprint prettyprinted" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">which returns </span></code><img src="http://i.stack.imgur.com/jdO1d.png" alt="enter image description here" style="font-family: arial, sans-serif; font-size: small; color: rgb(34, 34, 34); background-color: rgb(255, 255, 255);"></pre></div><div><div>But which is wrong as this is not a valid file path and does not exists so lisp : (load "filepath") fails here.</div><div><br></div><div><p style="margin:0px 0px 1em;padding:0px;border:0px;font-size:15px;clear:both;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;line-height:19.5px">When I use the code</p><pre class="lang-java prettyprint prettyprinted" style="margin-top:0px;padding:5px;border:0px;font-size:13px;overflow:auto;width:auto;max-height:600px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;color:rgb(57,51,24);word-wrap:normal;background-color:rgb(238,238,238)"><code style="margin:0px;padding:0px;border:0px;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,sans-serif;white-space:inherit"><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">String</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> path </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> url</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">toURI</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">();</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
</span><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">File</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="kwd" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,139)">new</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> </span><span class="typ" style="margin:0px;padding:0px;border:0px;color:rgb(43,145,175)">File</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">(</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">path</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">);</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">
path </span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">=</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)"> path</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">.</span><span class="pln" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">getAbsolutePath</span><span class="pun" style="margin:0px;padding:0px;border:0px;color:rgb(0,0,0)">();</span></code></pre></div><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px">Again it works fine while running from netbeans, but shows error "URI is not hierarchical" error while running the jar file.</span><br></div><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px"><br></span></div><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px">Has anyone encountered this issue, please help.</span></div><div><span style="font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;font-size:15px;line-height:19.5px"><br></span></div><div><br></div>-- <br><div class="gmail_signature">Hamda Binte Ajmal<br>NUIG, Ireland<br></div>
</div></div>