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.消息队列) 同步(互斥量.条件变量.读写锁.文件和写记录锁.信号量) 共享内存(匿名的和具名的) 远程过程调用 ...
随机推荐
- Jenkins--Credentials添加证书从git上拉代码
直接上图:
- 1.1 vue.js devtools使用教程
1. vue.js devtools使用教程
- 关于fstream、ifstream、ofstream读写文本文件、二进制文件详解
fstream.ifstream.ofstream是c++中关于文件操作的三个类 fstream类对文件进行读操作和写操作 打开文件 fstream fs("要打开的文件名",打开 ...
- new int
new int, 在申请内存,定义int变量:new int (100),在申请内存,定义int变量,并初始化为100:new int[100] , 在申请内存,定义int数组变量.
- Qt解析Json数据
1 JSON数据简介 JSON(JavaScript Object Notation, JS 对象简谱) 是一种轻量级的数据交换格式.它基于 ECMAScript (欧洲计算机协会制定的js规范) ...
- Java HashMap 遍历、删除、排序
首先创建一个map对象,并依次放入几个测试数据 HashMap<String, Integer> map = new HashMap<String, Integer>(); m ...
- ZOJ 3965 Binary Tree Restoring
Binary Tree Restoring 思路: 递归 比较a序列和b序列中表示同一个子树的一段区间,不断递归 代码: #include<bits/stdc++.h> using nam ...
- 日常英语---十二、MapleStory/Monsters/Level 1-10(Horny Mushroom)
日常英语---十二.MapleStory/Monsters/Level 1-10(Horny Mushroom) 一.总结 一句话总结: horny-['hɔːnɪ]-adj.角的 Another m ...
- MySQL中如何实现select top n ----Limit
Mysql中limit的用法详解 在我们使用查询语句的时候,经常要返回前几条或者中间某几行数据,这个时候怎么办呢?不用担心,mysql已经为我们提供了这样一个功能. LIMIT 子句可以被用于强制 S ...
- 雷林鹏分享:C# 字符串(String)
C# 字符串(String) 在 C# 中,您可以使用字符数组来表示字符串,但是,更常见的做法是使用 string 关键字来声明一个字符串变量.string 关键字是 System.String 类的 ...