Hello,

the following program

    import org.apache.bsf.*;

    public class Test {

        public static void main(String args[]) throws BSFException {

            Object obj = new BSFManager().eval("jython", "<script>", 0, 0,
                    new String("import sys\nsys.stderr.write('hello from 
jython\n')\n"));

        }
    }

fails with:

Exception in thread "main" org.apache.bsf.BSFException: exception from Jython:
Traceback (innermost last):
  (no code object) at line 0
SyntaxError: ('invalid syntax', ('<string>', 1, 1, 'import sys'))

        at org.apache.bsf.engines.jython.JythonEngine.eval(Unknown Source)
        at org.apache.bsf.BSFManager$5.run(Unknown Source)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.apache.bsf.BSFManager.eval(Unknown Source)
        at Test.main(Test.java:7)

what's wrong? -- Or: how can I get jython in bsf working?

-- 
Johannes

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to