Java Jython:子流程模块中的错误,AttributeError:';模块';对象没有属性';python';

Java Jython:子流程模块中的错误,AttributeError:';模块';对象没有属性';python';,java,python,subprocess,jython,Java,Python,Subprocess,Jython,我的项目是这样设置的,它在一个Java类中启动,该类使用PythonInterpreter.initialize方法设置我的python路径到jython Lib目录和一个包含“org/quirier/neofilis/my jython files”的目录。然后我创建了一个PythonInterpreter,并让它执行我的主jython文件 我猜这是非正统的,但它一直在工作,但当我试图使用波本,我得到了这个错误 File "/home/steven/jython/Lib/subprocess.

我的项目是这样设置的,它在一个Java类中启动,该类使用PythonInterpreter.initialize方法设置我的python路径到jython Lib目录和一个包含“org/quirier/neofilis/my jython files”的目录。然后我创建了一个PythonInterpreter,并让它执行我的主jython文件

我猜这是非正统的,但它一直在工作,但当我试图使用波本,我得到了这个错误

File "/home/steven/jython/Lib/subprocess.py", line 1163, in _get_handles
  elif isinstance(stdout, org.python.core.io.RawIOBase):
当我试图重现这个错误时,我发现我可以做到这一点

from org.python.util import PythonInterpreter

#A PythonInterpreter running inside a PythonInterpreter!
interpreter = PythonInterpreter()
interpreter.exec("print 3+6");
sys.exit(0)
但这没有飞起来

import org

interpreter = org.python.util.PythonInterpreter()
interpreter.exec("print 3+6");
sys.exit(0)

  File "/home/steven/neofelis/src/main/jython/org/curious/neofelis/main.py", line 34, in <module>
    interpreter = org.python.util.PythonInterpreter()
AttributeError: 'module' object has no attribute 'python'
导入组织
解释器=org.python.util.PythonInterpreter()
解释器执行(“打印3+6”);
系统出口(0)
文件“/home/steven/neofilis/src/main/jython/org/quirier/neofilis/main.py”,第34行,在
解释器=org.python.util.PythonInterpreter()
AttributeError:“模块”对象没有属性“python”
导入包--
org
在本例中,并不总是导入其所有子包和子模块。由软件包定义在执行导入组织时包含的内容。显然,默认情况下,
python
子包不包括在导入中,因此需要显式导入它