|
From: Thomas H. <tho...@io...> - 2001-01-11 15:10:58
|
I'm just trying to get up to speed with Jython: Very impressive!
One problem though:
I have a java JNI component which allows to set the color
of the Console (I'm using win2000 here).
This works fine from any java console program,
but from jython (or even from the program compiled with
jythonc) I get a traceback:
C:\work\chip\debugger>jython
Jython 2.0beta1 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> from ColoredConsole import setColor
>>> setColor(10)
Traceback (innermost last):
File "<console>", line 1, in ?
java.lang.IllegalAccessException
at java.lang.reflect.Method.invoke(Native Method)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:158)
at org.python.core.PyReflectedFunction.__call__(PyReflectedFunction.java:166)
at org.python.core.PyObject.__call__(PyObject.java:272)
at org.python.pycode._pyx2.f$0(<console>)
at org.python.pycode._pyx2.call_function(<console>)
at org.python.core.PyTableCode.call(PyTableCode.java:155)
at org.python.core.Py.runCode(Py.java:1050)
at org.python.core.Py.exec(Py.java:1064)
at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:124)
at org.python.util.InteractiveInterpreter.runcode(InteractiveInterpreter.java:87)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:68)
at org.python.util.InteractiveInterpreter.runsource(InteractiveInterpreter.java:42)
at org.python.util.InteractiveConsole.push(InteractiveConsole.java:83)
at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:62)
at org.python.util.jython.main(jython.java:178)
java.lang.IllegalAccessException: java.lang.IllegalAccessException
>>> ^Z
C:\work\chip\debugger>
Is it possible to use native methods together with jython?
Regards,
Thomas
|