-
Notifications
You must be signed in to change notification settings - Fork 186
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
Catch java.lang.System.exit() call #254
Comments
I have not tested this myself but I would assume the correct solution is to use a JProxy to implement a SecurityManager and prevent the System.exit(). |
JProxy implements interfaces but SecurityManager is a class. How to implement a class in JPype? |
Hmm. I will have to test that. It should be possible to proxy a class. One work around would be to just write a class that does the security exception and load it if the proxy does not work. |
It is not possible to Proxy a class. Currently the only way to handle this is to create a java class and load it to override the methods. At some point in the future we could create byte code to extend a class from withing python but this it on a long time scale. |
This one remains stuck on enhancement #420 which is a long term goal. |
Is there a way to catch java.lang.System.exit() call so that the process does not stop abruptly ?
I am using JPype in a Django application and the connected java app calls System.exit in several methods causing the django server to stop.
The text was updated successfully, but these errors were encountered: