def shutdownJVM(): """ Shuts down the JVM. This method shuts down the JVM and thus disables access to existing Java objects. Due to limitations in the JPype, it is not possible to restart the JVM after being terminated. """ _jpype.shutdown()
def _JTerminate(): try: import jpype.config # We are exiting anyway so no need to free resources if jpype.config.onexit: _jpype.shutdown(jpype.config.destroy_jvm, False) except RuntimeError: pass
def _JTerminate(): try: import jpype.config # We are exiting anyway so no need to free resources if _jpype.isStarted(): _jpype.JPypeContext.freeResources = False if jpype.config.onexit: _jpype.shutdown(jpype.config.destroy_jvm, False) except RuntimeError: pass
def shutdownJVM(): """ Shuts down the JVM. This method shuts down the JVM and disables access to existing Java objects. Due to limitations in the JPype, it is not possible to restart the JVM after being terminated. """ import threading if threading.current_thread() is not threading.main_thread(): raise RuntimeError("Shutdown must be called from main thread") _jpype.shutdown()
def shutdownJVM(): """ Shuts down the JVM. This method shuts down the JVM and disables access to existing Java objects. Due to limitations in the JPype, it is not possible to restart the JVM after being terminated. """ import threading import jpype.config if threading.current_thread() is not threading.main_thread(): raise RuntimeError("Shutdown must be called from main thread") if _jpype.isStarted(): _jpype.JPypeContext.freeResources = jpype.config.free_resources _jpype.shutdown(jpype.config.destroy_jvm, False)
def shutdownJVM(): _refdaemon.stop() _jpype.shutdown()
def shutdownJVM() : _refdaemon.stop() _jpype.shutdown()
def testShutdown(self): _jpype.fault("PyJPModule_shutdown") with self.assertRaisesRegex(SystemError, "fault"): _jpype.shutdown()
def _JTerminate(): try: _jpype.shutdown() except RuntimeError: pass
def shutdownJVM(): _jpype.shutdown()