I find your object factory solution very interesting. I tried it but I get the ff. error:
Exception in thread "main" Traceback (innermost last):
File "<string>", line 1, in ?
ImportError: no module named Employee
I tested inside Jython CLI it can properly import EmployeeType.
What did I miss?
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.