I set it to 21.
I built jar by hand.
Same behaviour, the release build crashes with “A DLL initialization routine failed.” Debug build runs.
I don’t tink it’s solvable by CMake configurations at the moment. It looks really like it’s imposible to build vtk 9.x for java!.
The problem is not in class files, but in release dlls of java wrapping.
You see the error when you just load one of these dlls with system load. For example vtkIOParallelXMLJava. It’s only anout wrapping DLLs, like e.g. vtkIOIOSSJava.
I will now start to build older vtk versions and try to figure out when this was introduced.