On Tue, Dec 20, 2011 at 10:42 AM, Antonio Recio amdx6...@gmail.com wrote:
I would like to use an alias to refer clojure.lang.RT/loadLibrary as lib.
You could just call: (System/loadLibrary vtkCommonJava)
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World
On Tue, Dec 20, 2011 at 6:42 PM, Antonio Recio amdx6...@gmail.com wrote:
I would like to use an alias to refer clojure.lang.RT/loadLibrary as lib.
Instead to use:
(clojure.lang.RT/loadLibrary vtkCommonJava)
I woul like to use this:
(def lib (clojure.lang.RT/loadLibrary))
(lib
On Tue, Dec 20, 2011 at 2:35 PM, Sean Corfield seancorfi...@gmail.comwrote:
On Tue, Dec 20, 2011 at 10:42 AM, Antonio Recio amdx6...@gmail.com
wrote:
I would like to use an alias to refer clojure.lang.RT/loadLibrary as lib.
You could just call: (System/loadLibrary vtkCommonJava)
This
On Tue, Dec 20, 2011 at 11:54 AM, Aaron Cohen aa...@assonance.org wrote:
You could just call: (System/loadLibrary vtkCommonJava)
This doesn't work, the library will be loaded into the wrong classloader.
That's the reason for RT.loadLibrary in the first place.
The source of RT.loadLibrary:
//
On Tue, Dec 20, 2011 at 3:52 PM, Sean Corfield seancorfi...@gmail.comwrote:
On Tue, Dec 20, 2011 at 11:54 AM, Aaron Cohen aa...@assonance.org wrote:
You could just call: (System/loadLibrary vtkCommonJava)
This doesn't work, the library will be loaded into the wrong classloader.
That's the
On Tue, Dec 20, 2011 at 1:04 PM, Aaron Cohen aa...@assonance.org wrote:
The classloader that loaded RT is the one that is used by the loadLibrary
call in RT.loadLibrary.
If you call System/loadLibrary from a clojure form, it will be an instance
of DynamicClassLoader that loads the library.
On Tue, Dec 20, 2011 at 6:35 PM, Sean Corfield seancorfi...@gmail.com wrote:
On Tue, Dec 20, 2011 at 1:04 PM, Aaron Cohen aa...@assonance.org wrote:
The classloader that loaded RT is the one that is used by the loadLibrary
call in RT.loadLibrary.
If you call System/loadLibrary from a clojure
Instead to use:
(clojure.lang.RT/loadLibrary vtkCommonJava)
I woul like to use this:
(def lib (clojure.lang.RT/loadLibrary))
(lib vtkCommonJava)
But I obtain an error:
CompilerException java.lang.RuntimeException:
java.lang.NoSuchFieldException: loadLibrary, compiling:(NO_SOURCE_PATH:83)