[slf4j-dev] [JIRA] Updates for SLF4J-548: Loading services (plugins) with the caller's ClassLoader

QOS.CH (JIRA) noreply-jira at qos.ch
Sat Sep 3 10:33:00 CEST 2022


SLF4J / SLF4J-548 [Open]
Loading services (plugins) with the caller's ClassLoader

==============================

Here's what changed in this issue in the last few minutes.

There is 1 comment.

View or comment on issue using this link
https://jira.qos.ch/browse/SLF4J-548

==============================
 1 comment
------------------------------

pierre on 03/Sep/22 10:20 AM
[~ceki],

I also think that loading Java services with the Thread Class loader as the default classloader is a bug in the JAVA API, which produces the undesirable effects such as:
 * Breaks classloader inheritance (unlike *new* or *classFormName* which uses as default the caller classloader)
 * Makes it impossible to modify the CLASSPATH through classloader inheritance (this limitation stems from the previous one)
 * Does not allow adding the SLF4J.jar archive to the MANIFEST file of any java jar archive (this limitation stems from the previous one).
 * Certainly many other problems not yet referenced.

Trying to run Java services loaded with default settings seems impossible with the Java API.

 This would mean writing a program with the methods *new* and *classForName* which would use the thread classloader by default... I pay a beer to whoever gets there.


==============================
 This message was sent by Atlassian Jira (v8.8.0#808000-sha1:e2c7e59)



More information about the slf4j-dev mailing list