How to load the jna jar file before cffi?

Mirko Vukovic <[email protected]>
Newsgroups gmane.editors.j.devel
Message-ID <CAO73BACUgk=aSsf_d-f_z20VbSHKHYnJo3X4QG-9sZELSCaYoQ@mail.gmail.com>
Hello,

In order for CFFI to load, I need to load jna-4.2.2.jar.

Right now, I have to do something like this:
(let ((jar-pathname
#P"c:/Users/977315/.m2/repository/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar"))
  (java:add-to-classpath (namestring jar-pathname)))

To automate loading of ASDFs that require CFFI I tried to automate the
process by adding a before method to 'load-op:

(eval-when (:compile-toplevel :execute :load-toplevel)
  (defmethod operate :before ((operation (eql 'asdf/lisp-action:load-op))
(component (eql :cffi)))
    (let ((jar-pathname
#P"c:/Users/977315/.m2/repository/net/java/dev/jna/jna/4.2.2/jna-4.2.2.jar"))
      (java:add-to-classpath (namestring jar-pathname)))))

That did not work.  I did read the ASDF manual, but could not figure out
how to do it.

I suspect someone has figured out the right way.  What is it?

Thanks,

Mirko
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.