Jython classnotfoundexception even if class file exists
I am using jython and calling some custom Java API and I have added all the jars I need, or I am using in my code and jython still complains about one class as it could not find (NoClassDefFoundError), I am not sure why, I checked all my jars in transit and I have this class in one of those jars on the way.
This is how I run my code
jython -Dpython.path=a.jar:b.jar:c.jar client.py
and it complains about the class that is in c.jar, any idea why this is happening. i am missing some additional options for jython (i am not including jython.jar in this path)
EDIT: I was trying to figure this out myself and I found that adding the same jar files to the CLASSPATH (e.g. exporting CLASSPATH = $ CLASSPATH: a.jar: b.jar ...) and running jython client.py is fine. This is strange behavior, I'm glad I got out of this question sooner than I thought
source to share