ML icon indicating copy to clipboard operation
ML copied to clipboard

Jython 3 installation is fragile wrt dependencies

Open khatchad opened this issue 8 months ago • 2 comments

Currently, we are installing the jython3-dev.jar file manually. However, this file has many dependencies, and since we manually install it, they don't get resolved automatically. Some of the dependencies are included in the Maven configuration but not all of them, which could result in a ClassNotFoundException or NoClassDefFoundError when running the code.

There is another file, namely, jython3.jar, which is a fat jar that includes all the dependencies. However, using this file instead of jython3-dev.jar doesn't seem to avoid the issues with missing dependencies despite those dependencies being included in the fat jar. This probably has something to do with Maven's classpath resolution, which would be my guess.

khatchad avatar Jun 12 '25 19:06 khatchad

To work around this problem, you have to write in the dependencies yourself, which come from Maven Central and not the fat JAR, e.g.:

https://github.com/wala/ML/blob/d684cbb113faad96445d3f3795b717f8655cee92/pom.xml#L103-L107

khatchad avatar Jun 12 '25 19:06 khatchad

To solve this issue, I believe we wound need to write a Maven configuration for Jython 3.

khatchad avatar Jul 11 '25 23:07 khatchad