By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,685 Members | 1,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,685 IT Pros & Developers. It's quick & easy.

Jython - problem import os

P: n/a

I'm using Jython in combination with Java, webservices and jboss4.0.4.

The webservice is implemented in java and creates an PythonInterpreter
object which loads the jython scripts.
I wrote an jython script which uses a function from another jython
file called

So, i wrote:

public void webMethod(){
PythonInterpreter p = new PythonInterpreter()

from library import *


import os

def testFunction():
....all these files are inside my ear-archive and the
represent my webservice class.
So, calling WebMethod returns:

ImportError: no module named javaos in

Any ideas?

Aug 8 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Thats it ...

Additionally I had to set the python path with sys.path.append to the
Lib folder .. and now it works perfect.

thanks a lot


Aug 14 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.