-
Notifications
You must be signed in to change notification settings - Fork 152
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
Cannot use JEP from JVM, initialized from C++ native code #410
Comments
I understand that there is workaround like the following:
But you understand that this is a last resort and a highly undesirable solution for a generic library. |
This is a duplicate of #401 and a fix has already been written and will be included in the next release of Jep. In the meantime if it is unnacceptable to set a context classloader for your thread you could also set a custom ClassEnquirerer in your JepConfig that uses a different ClassLoader. |
Ok, I prefer to wait for a new release. When, approximately, are you going to do this? |
I have added a Roadmap to the wiki with our release plans. Next release will come out around October 2022. |
Hello! I successfully used JEP from usual Java environment, where JVM is called via "java.exe" (Windows-8).
But really I need to use it from little other environment: C++ server, which initializes JVM itself (JNI technology). And I see that my simplest test does not work.
This is my code:
This is the result:
It seems to be your bug.
Below is your code, that I found in debugger:
You think that classloadersToTry contains only non-null values, but it is not so:
When JVM is started not by normal java.exe, but via JNI, Thread.currentThread().getContextClassLoader() will be null by default.
Could you fix this?
The text was updated successfully, but these errors were encountered: