JPype and classpath (Was Re: embedding jython in CPython... )

johng2001 at rediffmail.com johng2001 at rediffmail.com
Sun Jan 23 22:52:02 CET 2005


Thanks for the response. However, I continue to have problems. Allow me
to give some more detail.

For simplicity of testing, I hard coded the classpath and JVM path
(BTW getDefaultJVMPath() returns None on my system)

import os, os.path
from jpype import *

startJVM("C:/jdk1.5.0/jre/bin/client/jvm.dll",
"-Djava.class.path=D:/Temp/classes")
...
shutdownJVM()


I have setup a classes folder in the script folder (D:/Temp) and have
placed test.class in it.
I run the script from the script folder (working directory is the same
as script's root path in this case)

Now how do I load the class test? I am afraid I cannot make that out
from the docs.

The simple test class is
public class test
{
public int i = 100;
}


What do I have to do before I can write
test().i
?

Thank you for your time.




More information about the Python-list mailing list