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
class PojoTest:
user = User();
user.setFname("Prasad");
user.setLname("regula");
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".
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories