I figured it out, set python.path property.
Looks like PythonInterpreter in the factory class is calling standard Python interpreter, not Jython.
How do I make PythonInterpreter point to Jython instead then?On Wed, Nov 19, 2008 at 7:30 PM, Vincent Gulinao <firstname.lastname@example.org> wrote:
I find your object factory solution very interesting. I tried it but I get the ff. error:I tested inside Jython CLI it can properly import EmployeeType.
Exception in thread "main" Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: no module named Employee
What did I miss?On Sat, Nov 15, 2008 at 1:40 AM, Charlie Groves <email@example.com> wrote:
On Tue, Nov 11, 2008 at 8:29 PM, Vincent GulinaoDo you need to jythonc it? You can extend Java classes without
> For example, I need to extend a class from java, implement my end of the
> code, jythonc it, which will then be called by the framework.
jythonc, and you can instantiate Python classes from Java without
jythonc. I ask because jythonc is going away in 2.5, so it's not a
good long term solution.
Jython finds code through the classpath, so if you have jython and
> In particular, how do you tell Jython where to find the class you want to
> derive? (thus, the --classpath equivalent). How do you integrate the output
> of jythonc back to the framework?
your classes in your JVM, you can import your classes from Python and
make subclasses of them. The same goes in reverse. The framework
needs to be on the classpath at the same time, and you can use a
technique along the lines of
get your classes into it.