scriptengine

How do I run Python Scripts in Java with the ScriptEngine?

How do I run Python Scripts in Java with the ScriptEngine? Question: I’m trying to run Python Scripts in my Java Application with Jyton/ScriptEngine but it’s not working. ScriptEngine does not find JythonScriptEngine. public static void main(String[] Args) throws FileNotFoundException, ScriptException { PySystemState engineSys = new PySystemState(); engineSys.path.append(Py.newString("C:/Users/User/AppData/Local/jython2.7.2/jython.jar")); Py.setSystemState(engineSys); StringWriter writer = new StringWriter(); ScriptContext …

Total answers: 2