I tried compiling VTK 9.0 with Java wrappers in Visual Studio 9.0. With VTK 8.2, VS creates the project .class file and vtk.jar. With VTK 9.0, it does not; no class files nor vtk.jar. Therefore, building the INSTALL project in VS fails because it cannot find the vtk.jar.
I seriously hope that you do not give up on Java
CMake’s Visual Studio Java support does not work with the new way (letting CMake build the jar instead of manually through custom commands). The source files are made and you can make the jar manually, but for the build to make it, you will need to use Ninja or another non-IDE generator.
Do we use Ninja instead of CMake? Or do we feed the CMake output to Ninja? Any specific instructions on how to use Ninja to build VTK.
No, you tell CMake to use its Ninja generator.
Open a developer console for the toolchain you want to use. You can then open
cmake-gui from there. Alternatively, open a regular terminal (using cmd) and use
vcvarsall.bat to load the toolchain environment.
Thanks Ben, I’m so embarrassed. I don’t know what toolchain is and never heard of vcvarsall.bat. I’ll research those, thanks.
I do have a general question however. Do you know of other resources besides this blog, perhaps other discussion groups that might provide some answers. Anybody else out there besides you a me who use Java wrappers in Eclipse? It’s a real struggle getting a good solid installation done.
I don’t use them myself, I just try to keep the build working. I’d make a new thread about general Java usage. Ping folks who have also posted about Java in it (and me so I can at least follow along in case concrete improvements VTK can do arise).
I’m actually trying to implement FourPanesViewer in java.