Hello, Im trying to use PythonInterpreter from "jython-standalone" library in my Forge mod.
I want to run Python scripts from Java code using Jython. I have added the dependency for jython-standalone in my build.gradle file, but I still get a "NoClassDefFoundError" when I try to use PythonInterpreter.
Intellij IDEA does not show any errors in the editor, but the error occurs at runtime. I have tried to sync, rebuild, and invalidate caches, but nothing works.
Here is the part of my build.gradle file:
dependencies {
minecraft 'net.minecraftforge:forge:1.19.2-43.2.4'
implementation 'org.python:jython-standalone:2.7.3'
}
The error:
Exception in thread "Thread-11" java.lang.NoClassDefFoundError: org/python/util/PythonInterpreter
The part of code:
import org.python.util.PythonInterpreter;
public class p1 {
public static void LoadPart() {
PythonInterpreter interpreter = new PythonInterpreter();
...other
I have searched for a solution, but I could not find anything that works for me.
what im doing wrong?(Mb I imported this wrong?)