Hi all J


I need help!!!


I tried to add my jython files to my AS(Jboss), so I can execute them using PythonInterpeter like this:


1.PythonInterpreter interp = new PythonInterpreter();

2.interp.exec("import sys");

3.interp.exec("sys.path.append('C:\\Program Files\\jboss-4.0.4.GA')"); // show where the jython file is

4.interp.exec("import files"); // import it

      5.interp.exec("files.write_to_file('/temp/aaa.txt' ,2,1)"); // activate it



The problem is that I have to specify all the time where the jython file located (like I did in line – 3)


Do you know a better way?

  1. maybe I can add it to the EAR some how.
  2. maybe I can dictate using environmental variable where it is and so on…..