Python

Moderators: None (Apply to moderate this forum)
Number of threads: 474
Number of posts: 1166

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Calling Java Value objects from Jython Posted by rmvprasad on 20 May 2010 at 10:21 AM
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".



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.