Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Calling Java Value objects from Jython
I need to pass Java POJO's as parameter to the java class I would be calling from Jython. I declared a java project and created a pojo, under the package com.pojo.util and the pojo name is User. I created an python project and wrote the following code
from com.pojo.util import User
user = User();
print user.getFname(), user.getLname()
It is saying
Traceback (innermost last):
File "__init__.py", line 1, in ?
ImportError: no module named pojo
I am not sure how to call the java class existing in a different project from a Jython project. If I try to create a java class in the jython project it is saying this is jython project can't create a java class. Could you guide me how to proceed. My main target is "Passing of pojo's as parameters to Jython functions".