Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Sean Corfield
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

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread David Powell
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

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Aaron Cohen
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

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Sean Corfield
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: //

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Aaron Cohen
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

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Sean Corfield
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.

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Cedric Greevey
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

Re: How to create an alias of clojure.lang.RT/loadLibrary?

2011-12-20 Thread Baishampayan Ghose
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)