Issue with VTK 9.7.0 maven artifacts for Java

Hi all.

I am using the latest VTK 9.7.0 from within my Java 21-based application.

I am currently using the following Maven artifacts for both the VTK JAR file and the related native libraries:

<dependency>
    <groupId>org.vtk</groupId>
    <artifactId>vtk-java11</artifactId>
    <version>9.7.0</version>
</dependency>

<dependency>
    <groupId>org.vtk</groupId>
    <artifactId>vtk-java11</artifactId>
    <version>9.7.0</version>
    <classifier>natives-windows-amd-release</classifier>
</dependency>

While most VTK-based functionalities are working fine in my Java application, I am getting the following exception while rendering some JOGL-based panels:

Exception in thread "AWT-EventQueue-0" com.jogamp.opengl.GLException: Caught UnsatisfiedLinkError: 'void vtk.vtkOpenGLRenderWindow.SetOpenGLSymbolLoader2_78(long, long)' on thread AWT-EventQueue-0
at com.jogamp.opengl.GLException.newGLException(GLException.java:76)
at jogamp.opengl.GLDrawableHelper.invokeGLImpl(GLDrawableHelper.java:1327)
at jogamp.opengl.GLDrawableHelper.invokeGL(GLDrawableHelper.java:1147)
at com.jogamp.opengl.awt.GLCanvas$11.run(GLCanvas.java:1449)
at com.jogamp.opengl.Threading.invoke(Threading.java:223)
at com.jogamp.opengl.awt.GLCanvas.display(GLCanvas.java:504)
at com.jogamp.opengl.awt.GLCanvas.paint(GLCanvas.java:558)

I took a look at the vtkOpenGLRenderWindow.class file, and I realized that it indeed declares the following native JNI method:

private native void SetOpenGLSymbolLoader2_78(long var1, long var3);

However, looking at the corresponding native library “vtkRenderingOpenGL2Java.dll”, as extracted from the JAR of the native libraries provided by the Maven artifact, I detected the following:

dumpbin /exports vtkRenderingOpenGL2Java.dll | findstr /I SetOpenGLSymbolLoader2
982 3D5 00012860 Java_vtk_vtkOpenGLRenderWindow_SetOpenGLSymbolLoader2_179

Therefore, there seems to be a “78” vs “79” mismatch in the symbol name which is expected to be exported by the JNI native library.

Is there any chance that the Maven artifact is rebuilt and fixed? That would be great, as it is really handy!

Regards,

Marco Sambin