Skip to content Skip to sidebar Skip to footer

Issues Understanding How To Use Jython

I've just started learning Jython, and I'm having some issues with implementation. I've looked through the Demo files that come with Jython 2.5, and I'm still unsure how to impleme

Solution 1:

I think the answer is CLASSPATH.

hello.py

print "Hello"

Let's run it

> python hello.py
Hello

> jython hello.py
Hello

Compile (I used py_compile to compile single file)

> jython -m py_compile hello.py

Run with java

> java -classpath d:\P\jython253\jython.jar;. hello$py
Hello

Note the dot in classpath. It is required for java to find your compiled class in current directory.


Post a Comment for "Issues Understanding How To Use Jython"