On Wed, 24 Jan 2024 12:16:44 GMT, xxDark <d...@openjdk.org> wrote:

> You need to check if class is already loaded by trying findLoadedClass first.

You're right. I had forgotten the intricacies of class loader delegation. The 
only hard constraint on loading a class in multiple loaders is that `java.*` 
classes [must (only) be loaded by the boot 
loader](https://github.com/openjdk/jdk/blob/bccd823c8e40863bed70ff5b24772843203871a5/src/java.base/share/classes/java/lang/ClassLoader.java#L904).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/17520#issuecomment-1908157130

Reply via email to