Jython calls wrong method when trying to call Java method with a boolean
19:57 30 Nov 2025

My Java class has several flavors of the same method with each method taking a different Java type as an argument. One takes an int, one takes a boolean, etc.

When my Python code calls method(True), jython calls the int flavor of the method and not the boolean flavor. The result is that the code generates a string of "1" rather than "true"

If this is a limitation of the bridge between Python and Java, I suppose I will have to add methods for Python which have different names. Which I have done and it works. But it would be nice if I didn't have to.

jython jython-2.7