2011/8/27 Zhangguangchao <zhangguangchao@huawei.com>
Hi, jython experts,
I'm new to jython, and I met a problem that when I embed jython interpreter into my app, I find that after I execute the python script , the jar file which is appended to path of the PysystemState instance of the embedded interpreter can't be deleted.
Here is my usage of adding jar dynamically:
       PySystemState systemState = pythonInterpreter.getSystemState();
       systemState.path.append(new PyString(file.getAbsolutePath()));

Then I use the pythonInterpreter to execute some python code. However, when I wanna stop the jython engine, the jar file can't be deleted. Here is my stop code:
       pythonInterpreter = null;

Can anyone tell me how to stop the embedded jython properly in order to delete the imported jar ? Thanks a lot.



systemState.path.remove(new PyString(file.getAbsolutePath()));



My blog and profile (http://pierrethibault.posterous.com)
YouTube page (http://www.youtube.com/user/tubetib)
Twitter (http://twitter.com/pierreth2)