-
Notifications
You must be signed in to change notification settings - Fork 178
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
ERROR: JVM cannot be restarted. #959
Comments
This is expected behavior, in that it's a documented limitation. See API doc of
|
A few other issues worth linking to: #393 (comment), and #84 (comment). This isn't a limitation introduced by JPype, but rather by the underlying JNI. (I can't close the issue, but recommend it should be closed as a "can't fix") |
can't fix |
Hello, I know it cannot be fixed through jpype but is there any workaround based on what happen when the kernel is restarted? variable/memory cleaning link to JVM that we can perform may be without restarting the kernel? |
I am not sure what you are referring to by kernel. The JVM is a process level library and thus it lives as long as the process unless terminated prematurely with "shutdownJVM". It has nothing to do with the kernel. The official JVM stopped supporting restarting capabilities in Java 1.2 and there are as far as I know no implementations with the capability. The JNI supports restarting or multiple JVMs, but without support from the JVM that is just useless capabilities. Unfortunately they uses statics in the JVM so that no more than one copy can be installed, and once started it installs OS hooks that it does not remove. Thus you can't even unload the JVM shared library and reload it to create a fresh copy. I personally feel that having a user callable "shutdown" is a mistake in JPype design. The JVM was never intended to be run as a submodule. Once started it needs to run until of the process. Only when the process is preparing to exit should the JVM ever be told to begin shutdown procedures. |
stop jvm, then start jvm, get this error.
my code:
The text was updated successfully, but these errors were encountered: