Does jython depend on java class.

Alan Kennedy alanmk at hotmail.com
Thu Jul 29 16:24:34 CEST 2004


[angel]
> A java runtime environment includes jvm and java class (for example
> classes.zip in sun jre). Of course jython need jvm,but does it need java
> class.

Yes, jython requires specific classes at runtime.

For example, the python dictionary type is implemented by the java 
classes org.python.core.PyStringMap and org.python.core.PyDictionary. 
The .class files for these classes are stored in jython.jar, which 
always has to be loadable/in-your-classpath when your java application 
uses jython.

Jython also includes its own specialised classloader, due to the 
highly dynamic nature of jython class construction, which can cause 
problems in certain security-conscious environments. This classloader 
can be bypassed by compiling jython classes to java with jythonc. But 
even with jythonc-generated java classes the dependency on jython.jar 
remains, because of the need for access to the definitions of 
org.python.core.PyDictionary, etc.

HTH,

-- 
alan kennedy
------------------------------------------------------
check http headers here: http://xhaus.com/headers
email alan:              http://xhaus.com/contact/alan



More information about the Python-list mailing list