Skip to content

@AutoService and ServiceLoader #9779

Answered by laurit
dhpagani asked this question in Q&A
Discussion options

You must be logged in to vote

I think your hunch is correct, but instead of Thread.currentThread().getContextClassLoader(), which probably returns null, you should be passing this.getClass().getClassLoader() to the ServiceLoader.load(...).

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by dhpagani
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants