On 14/08/2018 15:07, Stephen Colebourne wrote:
A new method MethodHandles.Lookup defineClass() was added recently.
But what about a defineResource? For adding a new resource to the
classpath (such as a .txt file). I just needed such a thing, and
though undoubtedly rare, all the recommended solutions use reflection
and setAccessible().

It might be useful to expand on your use-case a bit more. It may be that you are really just looking to create a ClassLoader that can locate a resource that you generate at run-time. Also the mention of core reflection and setAccessible isn't clear as they aren't used with resources.

-Alan

Reply via email to