Пример #1
0
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()
Пример #2
0
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
Пример #3
0
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
Пример #4
0
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()
Пример #5
0
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)
Пример #6
0
def shutdownJVM():
    _refdaemon.stop()
    _jpype.shutdown()
Пример #7
0
def shutdownJVM() :
    _refdaemon.stop()
    _jpype.shutdown()
Пример #8
0
 def testShutdown(self):
     _jpype.fault("PyJPModule_shutdown")
     with self.assertRaisesRegex(SystemError, "fault"):
         _jpype.shutdown()
Пример #9
0
def _JTerminate():
    try:
        _jpype.shutdown()
    except RuntimeError:
        pass
Пример #10
0
def shutdownJVM():
    _jpype.shutdown()
Пример #11
0
def shutdownJVM():
    _jpype.shutdown()