如下所示:
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from jpype import *
jvmPath = getDefaultJVMPath()
jars = [ "./Firstmaven-1.0-SNAPSHOT-jar-with-dependencies.jar" ]
startJVM(jvmPath,jvm_cp)
sedisObj = JClass( "LogBack" )
so = sedisObj()
print so.get_v( 'name0' )
print so
print so.get_int()
shutdownJVM()
|
以上这篇python调用java的jar包方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持服务器之家。
原文链接:https://blog.csdn.net/h_jlwg6688/article/details/79724521