From: Евгений К. <ff...@gm...> - 2019-08-13 11:34:53
|
Hello. I try to use Russian in Jython under Java. I found example like this: PythonInterpreter interpreter = new PythonInterpreter() { { cflags = new CompilerFlags(CompilerFlags.PyCF_SOURCE_IS_UTF8); } }; And when i use it in Java it works and Jython is output in Unicode. But when i compile it with Java Compiler API i have this error: Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: org/python/util/PythonInterpreter at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Unknown Source) at java.lang.Class.privateGetMethodRecursive(Unknown Source) at java.lang.Class.getMethod0(Unknown Source) at java.lang.Class.getMethod(Unknown Source) at sun.launcher.LauncherHelper.validateMainClass(Unknown Source) at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source) Caused by: java.lang.ClassNotFoundException: org.python.util.PythonInterpreter at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 7 more What i can do? |