python调用jpype
1 import jpype 2 from jpype import * 3 4 # jvmPath = jpype.getDefaultJVMPath() 5 jvmPath = 'C:\\Program Files\\Java\\jdk1.8.0_211\\jre\\bin\\server\\jvm.dll' 6 jpype.startJVM(jvmPath, "-Djava.class.path=C:\\Users\\user\\IdeaProjects\\GYP_test\\out\\artifacts\\GYP_test_jar2\\GYP_test.jar") 7 JClass = jpype.JClass('com.Main') 8 instance = JClass() 9 result = instance.sayHello('gyp') 10 print(result) 11 jpype.shutdownJVM()
引用博客:https://blog.csdn.net/jusang486/article/details/83752499
https://www.cnblogs.com/ai594ai/p/8615818.html
https://www.cnblogs.com/jasmine-Jobs/p/10014643.html