Does jython depend on java class.

angel dai4happy at yahoo.com
Fri Jul 30 04:55:41 CEST 2004


Thank you for your reply.

But I still want to confirm if jython requires standard java class, for
example java.lang.* java.util.* ...
>From the word "the python dictionary type is implemented by the java
classes org.python.core.PyStringMap and org.python.core.PyDictionary" , I
guess jython should depend on java.lang.String, java.util.Hashtable ...

So jython doesn't only compile python source code to java bytecode, it is
implemented by java language. Is it correct?

Thanx

"Alan Kennedy" <alanmk at hotmail.com>
??????:KM7Oc.5748$Z14.6872 at news.indigo.ie...
> [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