python javar send
# -*- coding: utf-8 -*-
import jpype
import os.path
jarpath = os.path.join(os.path.abspath('.'), 'axja')
print("=====>jarpath: " , jarpath)
# jpype=startJVM("D:/devsoft/ultimate/env/jdk/jdk7/Java17017/jre7/bin/server/jvm.dll", "-ea", "-Djava.class.path=%s" % ('D:/pyspace/pyChapter1/test/axja/TesCrypt.jar'))
# startJVM("D:/devsoft/ultimate/env/jdk/jdk7/Java17017/jre7/bin/server/jvm.dll", "-ea", "-Djava.class.path=%s" % (jarpath + 'TesCrypt.jar'))
# startJVM("D:/devsoft/ultimate/env/jdk/jdk7/Java17017/jre7/bin/server/jvm.dll", "-ea")
# startJVM(getDefaultJVMPath(),"-ea", "-Djava.class.path=%s" % (jarpath + 'TesCrypt.jar'))
# startJVM(getDefaultJVMPath(),"-ea", "-Djava.class.path=%s" % (jarpath + 'TesCrypt.jar'))
# JDClass = JClass("jpype.com.azx.crypt.JpypeDemo")
# jvmPath = jpype.getDefaultJVMPath() # 默认的JVM路径
# jvmPath ="D:/envs/jdk/jdk32/jdk7/jdk1.7.0_79/jre/bin/client/jvm.dll" # 默认的JVM路径
jvmPath ="D:/devsoft/ultimate/env/jdk/jdk7/Java17017/jre7/bin/server/jvm.dll" # 默认的JVM路径
print(jvmPath)
# jpype.startJVM(jvmPath,"-ea","-Djava.class.path=%s" % (jarpath + 'TesCrypt.jar'))
# startJVM("C:/Java/jdk1.6.0_10/jre/bin/client/jvm.dll","-ea", "-Djava.class.path=%s" % (jarpath + 'jpypedemo.jar'))
ext_classpath = r'D:\pyspace\pyChapter1\test\axja\TesCrypt.jar'
#jarpath = os.path.join(os.path.abspath('.'), 'F:/sample_Py/') #os not found
jvmArg = '-Djava.class.path=%s'%ext_classpath
print("=====>jvmArg: " , jvmArg)
jpype.startJVM(jvmPath,'-ea',jvmArg)
# JDClass = JClass("jpype.com.azx.crypt.JpypeDemo")
JDClass = jpype.JClass("com.azx.crypt.JpypeDemo")
jd = JDClass()
jd.sayHello("wxxxxxxaw")
#jd = JPackage("jpype").JpypeDemo() #两种创建jd的方法
jpype.java.lang.System.out.println("hello world!")
# jd = JPackage("jpype.com.azx.crypt.").JpypeDemo() #两种创建jd的方法
# jd = JDClass()
# jd.sayHello("hello world")
jpype.shutdownJVM()
# _*_ coding:utf-8 _*_
import jpype
jvmPath = jpype.getDefaultJVMPath() # 默认的JVM路径
print(jvmPath)
jpype.startJVM(jvmPath)
jpype.java.lang.System.out.println("hello world!")
jpype.java.lang.System.out.println("I hate you!")
jpype.shutdownJVM()
python javar send的更多相关文章
- python auto send email
/*************************************************************************** * python auto send emai ...
- Python中send()和sendall()的区别
Python中send()和sendall()的区别 估计每个学习Python网络编程的人,都会遇到过这样的问题: send()和sendall()到底有什么区别? send()和sendall()原 ...
- python email ==> send 发送邮件 :) [smtplib, email 模块]
关于Email的预备知识: 原贴地址:http://www.cnblogs.com/lonelycatcher/archive/2012/02/09/2343480.html ############ ...
- python trojan development 1st —— use python to send mail and caputre the screen then combine them
import smtplib from email.mime.text import MIMEText msg_from='1@qq.com' #发送方邮箱 passwd='bd' #填入发送方邮箱的 ...
- python trojan development 2nd —— use python to send mail and listen to the key board then combine them
请勿用于非法用途!!!!!本人概不负责!!!原创作品,转载说明出处!!!!! from pynput.keyboard import Key,Listener import logging impor ...
- python yield: send, close, throw
send 1. yield可以产出值,可以接收值 2. 在调用send发送非none值之前,我们必须启动一次生成器, 方式有两种 a. gen.send(None) b. next(gen) def ...
- Python中send和sendall的区别
官方文档对socket模式下的socket.send() 和 socket.sendall()解释如下: sock.sendall(string[, flags]) Send data to the ...
- python莫名其妙的yield, yield from, yield.send
练了几行代码, 慢慢找感觉. TASK,多线程,异步,很多地方都用到的呢. #!/usr/bin/env python # -*- coding: utf-8 -*- import time from ...
- python之网络编程
本地的进程间通信(IPC)有很多种方式,但可以总结为下面4类: 消息传递(管道.FIFO.消息队列) 同步(互斥量.条件变量.读写锁.文件和写记录锁.信号量) 共享内存(匿名的和具名的) 远程过程调用 ...
随机推荐
- Android Studio 使用USB真机调试教程
允许安装未知来源的软件 允许USB调试 设置启动方式 选择USB device 然后运行 会自动安装软件启动! 参考: https://blog.csdn.net/fubo1990/article/d ...
- prometheus的agent 二次开发代码参考
import com.codahale.metrics.MetricRegistry;import io.prometheus.client.CollectorRegistry;import io.p ...
- [原]windows sdk版本不对
系统硬盘换了,重新安装一堆软件,SVN. 之前的SVN地址直接能找到 在编译vs项目的时候出现问题: windows sdk 10.0.14393.0 版本找不到 发现自己按照vs时候更新不了最新sd ...
- 学习笔记9—python数据表的合并(join(), merge()和concat())
merage# pandas提供了一个类似于关系数据库的连接(join)操作的方法<Strong>merage</Strong>,可以根据一个或多个键将不同DataFrame中 ...
- x1c2017 8G版 win linux的取舍纠结记录
x1c 2017 的 i5 7200U 8G ram 的丐版.换了1T SSD.其实一般使用没啥问题. 1 外出携带的轻便性太满意(mac13寸相比之下都太重了): 2 coding时候的安静性,比原 ...
- 牛客OI周赛4-提高组 A K小生成树(kmst)
K小生成树(kmst) 思路: 暴力+并查集 枚举边的子集,用并查集判断两个点联不联通 代码: #include<bits/stdc++.h> using namespace std; # ...
- lua中产生 1 - n 之间不重复随机数
local function GetRandomNumList(len) local rsList = {} ,len do table.insert(rsList,i) end local num, ...
- lua --- dofile、loadfile、require
loadfile: 1>编译代码成中间码并且返回编译后的chunk作为一个函数,而不执行代码 2>在发生错误的情况下,不会抛出异常,但会返回nil和错误信息 3>运行一个文件多次的话 ...
- PyMongo官方文档翻译——VNPY
PyMongo是MongoDB数据库的python模块 VNPY默认的数据库,没有采用SQL类型的数据库,而是采用No-Sql类型的MongoDB数据库, 对于想了解VNPY内部结构的童鞋,多多少少会 ...
- Oracle:新增用户登录提示“ORA-04098:触发器‘GD.ON_LOGON_TRIGGER’无效且未通过重新验证”
接着上一篇创建一个只有查看权限的用户,在测试环境,新建账号后尝试登录,提示如下: 1.看提示是base库的触发器有问题了,所以先定位到这个触发器 SELECT * FROM DBA_OBJECTS W ...