Make extensible to any ClassLoader, not just URLClassLoader derivatives

Description

Currently, only URLClassLoaders are supported, but with the introduction of a protocol for obtaining a sequence of URL's corresponding to the segments of a ClassLoader's classpath, we make it possible to use this library in JVM's that don't necessarily use a URLClassLoader, e.g. JBoss.

Environment

None

Attachments

1

Activity

Show:

Stuart Sierra January 10, 2014 at 5:26 PM

in release 0.2.2

Stuart Sierra January 8, 2014 at 1:53 AM

1. Yes, but I would prefer to keep it optional.

2. Not at this time.

Jim Crossley January 7, 2014 at 11:34 PM

That looks good, Stuart, thanks! I have two followup questions:

1) Are you open to using this in tools.namespace?
2) Do you think it's worth obviating dynapath with java.classpath?

This jira gets you most of the way to #2 already. Lacking is the ability to invoke .addURL to expand a classloader's classpath at runtime. If you think it's a good idea, I'll add a jira and take a whack at it.

Stuart Sierra January 7, 2014 at 11:01 PM

Modified to avoid changes to existing public functions. Committed to master at 0b3401cc

Will build as version 0.2.2-SNAPSHOT, available via Sonatype repo.

Please test and confirm that this satisfies your use case.

Jim Crossley January 7, 2014 at 10:35 PM

Rebased the patch to make it more clear

Completed

Details

Assignee

Reporter

Patch

Code

Priority

Created January 7, 2014 at 9:52 PM
Updated January 10, 2014 at 5:26 PM
Resolved January 10, 2014 at 5:26 PM