« Return to Thread: JPype // TypeError // Getting it to work with Jar file for first time
Dear Steve, Raj,
Below is my result of my trying to use JClass.
It is clear that the class is not being found, but I am at a loss to
explain.
FYI, I also tried changing the options to the use the java options that I
typically use when accessing a jar file via a batch file. (I do not see that
it makes any difference)
Thanks,
Timothy
----------Error Message---------
Warning (from warnings module):
File "C:\Python26\lib\site-packages\jpype\_pykeywords.py", line 18
import sets
DeprecationWarning: the sets module is deprecated
File "C:/Python26/testPype3a.py", line 11, in <module>
Traceback (most recent call last):
myClass = jpype.JClass(className)
File "C:\Python26\lib\site-packages\jpype\_jclass.py", line 54, in JClass
raise _RUNTIMEEXCEPTION.PYEXC("Class %s not found" % name)
java.lang.ExceptionPyRaisable: java.lang.Exception: Class junkTest.TestSteam
not found
----------Python Code---------
#testPype3a.py
import jpypeoptions = ("-Xms64m", "-Xmx512m", "-cp") # "-ea"
jvmPath = "C:/Program Files/Java/jdk1.5.0_13/jre/bin/client/jvm.dll"
jarPath = "-DJava.class.path=C:/Python26/junkTest.jar"
className="junkTest.TestSteam"
jpype.startJVM(jvmPath,options, jarPath)
myClass = jpype.JClass(className)
myInstance = myClass()
----------Jar File---------
I used the new jar file in my C:\Python26 folder (see prev. post).
--
View this message in context: http://old.nabble.com/JPype----TypeError----Getting-it-to-work-with-Jar-file-for-first-time-tp30703870p30705100.html
Sent from the jpype-users mailing list archive at Nabble.com.
------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand
malware threats, the impact they can have on your business, and how you
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Jpype-users mailing list
Jpype-users@...
https://lists.sourceforge.net/lists/listinfo/jpype-users
« Return to Thread: JPype // TypeError // Getting it to work with Jar file for first time
| Free embeddable forum powered by Nabble | Forum Help |