Re: [Jepp-users] Problem with using Java classes in Python code
Brought to you by:
mrjohnson0
From: Marcin Z. <ms...@wp...> - 2012-02-28 13:08:01
|
Dnia 28-02-2012 o godz. 10:39 Marcin Zajączkowski napisał(a): > Hi, > > I tried to use a simple Java class in Python code based on a > http://jepp.sourceforge.net/usage.html#features > > <code> > from java.util import Arrays > > print Arrays.toString(stringArray) > </code> > > Unfortnately I've got: jep.JepException: <type > 'exceptions.ImportError'>: No module named java.util. > > I tried also with examples in a documentation, but with no luck. Do you > know what could be wrong? I have found that using code in Test.java and test.py is much more useful. The problem was with missing additional imports. Working code (for other group's readers): <code> from jep import * __builtins__.__import__ = jep.jimport from java.util import Arrays </code> Regards Marcin > > Jepp 2.4, CPython 2.7.2, Fedora 16, 64-bit > > Regards > Marcin |