Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retrieve Resource from Inside Plugin #79

Closed
Reyzerbit opened this issue Sep 20, 2023 · 1 comment
Closed

Retrieve Resource from Inside Plugin #79

Reyzerbit opened this issue Sep 20, 2023 · 1 comment

Comments

@Reyzerbit
Copy link

I understand that in order to load a resource from inside a plugin jar file, you need to use the Plugin Class Loader. I have two questions about that.

  1. Is it safe to pass the plugin class loader to the plugin itself via the PluginContext I created? My initial gut feeling is no, since you can access the parent/bootstrap classloader from the plugin class loader via getParent().
  2. If I am correct, and passing the plugin class loader to the plugin itself is not safe, how would I safely load a resource from the plugin jar file from inside the plugin code itself?
@Reyzerbit
Copy link
Author

Welp, realized I was on the wrong PF4J repo, my bad

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant