<< Back to previous view

[CLJ-843] clojure.lang.RT should provide a loadLibrary static method Created: 26/Sep/11  Updated: 02/Dec/11  Resolved: 02/Dec/11

Status: Closed
Project: Clojure
Component/s: None
Affects Version/s: Release 1.3
Fix Version/s: Release 1.4

Type: Enhancement Priority: Minor
Reporter: Baishampayan Ghose Assignee: Unassigned
Resolution: Completed Votes: 0
Labels: None

Attachments: Text File 0001-Add-a-static-method-loadLibrary-to-clojure.lang.RT-t.patch    
Patch: Code
Approval: Ok

 Description   

Right now, loading native libraries in Clojure doesn't work as expected because those libraries are loaded into the classloader of the invoking class (that is, Clojure's own classloader).

This problem has been discussed on the mailing list and a patch has been welcomed by Rich -

https://groups.google.com/group/clojure/browse_thread/thread/aa72e43091ec3228?pli=1
https://groups.google.com/forum/#!topic/clojure-dev/awe7-yeieIM
https://groups.google.com/forum/?hl=en#!topic/clojure-dev/OFQhDKHTyrw

To fix this, I am attaching a trivial patch that implements loadLibrary in RT.



 Comments   
Comment by Chouser [ 20/Nov/11 4:02 PM ]

Tests would be nice, though I can see how getting such a test to work without 3rd party deps might be difficult.

My naive attempts to reproduce the problem failed. For example, this works fine for me:
(System/loadLibrary "hprof")

Nevertheless, the patch applies cleanly and appears to be what Rich asked for, so I'm setting this to "screened".

Generated at Sun May 19 11:56:01 CDT 2019 using JIRA 4.4#649-r158309.