[CLASSPATH-1] clojure.java.classpath/system-classpath is incorrect when running in a classloader other than the application classloader Created: 13/Sep/11 Updated: 27/Jan/12 Resolved: 27/Jan/12 |
|
| Status: | Resolved |
| Project: | java.classpath |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Defect | Priority: | Major |
| Reporter: | Justin Balthrop | Assignee: | Stuart Sierra |
| Resolution: | Duplicate | Votes: | 0 |
| Labels: | None | ||
| Attachments: |
|
| Patch: | Fixed |
| Description |
|
Because system-classpath uses java.class.path, it doesn't work when running in a classloader other than the application classloader. This happens when running in any container that uses a custom classloader (e.g. Jetty, Cake, TomCat). The fix is to use (.getURLs (.getClassLoader clojure.lang.RT)) instead of (System/getProperty "java.class.path"). A patch is attached. |
| Comments |
| Comment by Justin Balthrop [ 13/Sep/11 8:56 PM ] |
|
Hugo provides a more general solution in |
| Comment by Stuart Sierra [ 27/Jan/12 9:44 AM ] |
|
Resolved by |