How can I stop the ServiceLoader so that I can reload the jars? I have tried to call the load method again. Unfortunately this did not help.
Asked
Active
Viewed 146 times
1 Answers
0
Regarding the javadoc documentation you can use the reload
method:
Clear this loader's provider cache so that all providers will be reloaded.
After invoking this method, subsequent invocations of the iterator method will lazily look up and instantiate providers from scratch, just as is done by a newly-created loader.
This method is intended for use in situations in which new providers can be installed into a running Java virtual machine.

flaxel
- 4,173
- 4
- 17
- 30
-
oh, I forgot to mention that. I tried "reload()", too, but unfortunately it did not work. My test method had output the same debug text. – LiIRCode Oct 29 '20 at 20:53
-
Can you post your test method in your question? – flaxel Oct 29 '20 at 21:08