Add feature to Utils class to support a custom ClassLoader configuration#149
Add feature to Utils class to support a custom ClassLoader configuration#149toastertaster wants to merge 1 commit intoastonbitecode:masterfrom
Conversation
…ion when the SystemClassLoader is not able to access classes of interest.
|
Hi @toastertaster. Thanks, I am very glad to know that So, to understand your use case, do you need to set up the classloader of your choice only once, during the Jvm creation? Or you need something more fine-grained, being able to change the classloader back and forth at will during the runtime? |
|
Hi @astonbitecode, for my particular use case, I was planning on calling the Thank you for your patience. |
Hello @astonbitecode . I have been using j4rs for about 2 years now and it's really been a lifesaver. Thank you for all of the effort you have put into it! I've learned so much about the JavaVM internals in the process.
Submitting a PR with a suggested change to the Utils class. My project's upstream recently switched to Java17 and this caused a problem in loading a class through j4rs (on the rust side). In tracking down the details, Java17 disabled allowing substitution to the SystemClassLoader. Some of the classes that I use through j4rs are loaded later in the program execution (as an eclipse plugin), and use a ClassLoader that Eclipse makes in that process. With this change to Utils, I can allow j4rs to retrieve the classes and continue working.
🥂