Error during VTK 9.3.0 build from sources with Java Wrapper

I am trying to build the VTK version 9.3.0 from git sources (commit 357d9ef) on Windows 11 x64. I was following these instructions and set the VTK_WRAP_JAVA=ON because I need the VTK.jar file. After executing the
cmake --build %HOMEPATH%\vtk\build --config Release
command, it run into the following error:

vtkCompositeSurfaceLICMapperJava.cxx.obj : error LNK2019: unresolved external symbol vtkCompositePolyDataMapper_Typecast referenced in function vtkCompositeSurfaceLICMapper_Typecast
lib\java\vtk-Windows-AMD64\vtkRenderingLICOpenGL2Java.dll : fatal error LNK1120: 1 unresolved externals

Does anyone know how to resolve the error?

I am using:
CMake v3.28.3
ninja v1.11.1
Visual Studio 2022 (I also tried using 2019 and 2017)
Java 17

I also tried building it with CMake GUI and Visual Studio, but got the same error.

Any advice would be highly appreciated.