コード例 #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
ファイル: _core.py プロジェクト: Thrameos/jpype
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
ファイル: _core.py プロジェクト: cc2841319251/learn_git
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
ファイル: _core.py プロジェクト: cc2841319251/learn_git
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
ファイル: _core.py プロジェクト: JiadaoZ22/NLP
def shutdownJVM():
    _refdaemon.stop()
    _jpype.shutdown()
コード例 #7
0
ファイル: _core.py プロジェクト: Kcrong/speech_analysis
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
ファイル: _core.py プロジェクト: originell/jpype
def shutdownJVM():
    _jpype.shutdown()