Exemplo n.º 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()
Exemplo n.º 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
Exemplo n.º 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
Exemplo n.º 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()
Exemplo n.º 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)
Exemplo n.º 6
0
def shutdownJVM():
    _refdaemon.stop()
    _jpype.shutdown()
Exemplo n.º 7
0
def shutdownJVM() :
    _refdaemon.stop()
    _jpype.shutdown()
Exemplo n.º 8
0
 def testShutdown(self):
     _jpype.fault("PyJPModule_shutdown")
     with self.assertRaisesRegex(SystemError, "fault"):
         _jpype.shutdown()
Exemplo n.º 9
0
def _JTerminate():
    try:
        _jpype.shutdown()
    except RuntimeError:
        pass
Exemplo n.º 10
0
def shutdownJVM():
    _jpype.shutdown()
Exemplo n.º 11
0
def shutdownJVM():
    _jpype.shutdown()