vtk module with JAVA wrapping

Hello together,

We are working on migrating our code from vtk 7 to vtk 9.4.1. We use the java wrapping functionality. In the actual version, there is in “Examples\Build\vtkMy” an example how to build a custom module. In the Cmake there is block creating python wrappings:

if(VTK_WRAP_PYTHON)
  vtk_module_wrap_python(
    MODULES             ${my_modules}
    INSTALL_EXPORT      VTKMY
    PYTHON_PACKAGE      "vtkmy"
    CMAKE_DESTINATION   "${my_config_dir}"
    BUILD_STATIC        OFF)
endif()

But not for java,. Adding a similar block for java fails:

  vtk_module_wrap_java(
    MODULES ${my_modules}
    INSTALL_EXPORT VTKVEO
    JAVA_PACKAGE "org.vtk.veo"
    CMAKE_DESTINATION "${my_config_dir}"
    BUILD_STATIC OFF) .

with an error:

CMake Error at C:/VEO_MIDO_BUILD/VTK_BUILD/RELEASE_BUILD/lib/cmake/vtk-9.4/vtkModule.cmake:2172 (get_property):
  get_property could not find TARGET OFF.  Perhaps it has not yet been
  created.
Call Stack (most recent call first):
  C:/VEO_MIDO_BUILD/VTK_BUILD/RELEASE_BUILD/lib/cmake/vtk-9.4/vtkModuleWrapJava.cmake:257 (_vtk_module_get_module_property)
  C:/VEO_MIDO_BUILD/VTK_BUILD/RELEASE_BUILD/lib/cmake/vtk-9.4/vtkModuleWrapJava.cmake:516 (_vtk_module_wrap_java_library)
  CMakeLists.txt:127 (vtk_module_wrap_java)

Can anybody help to compile local VTK classes and wrapped into
C++/Java how it was possible in earlier VTK versions?

Interesting. Not sure why it fails there, but the arguments you have are not parsed because only MODULES is actually a keyword that is recognized. See the docs for the arguments actually supported.