# VTK 9.0 using Java Wrappers

**URL:** <https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475>\
**Category:** Development\
**Created:** [June 5, 2020, 5:48pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475 "2020-06-05T17:48:43Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dporter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dporter](https://discourse.vtk.org/u/dporter)\
**Post date:** [June 5, 2020, 5:48pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/1 "2020-06-05T17:48:43Z")

</div>

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

Any solutions?

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [June 5, 2020, 5:52pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/2 "2020-06-05T17:52:50Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![dporter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dporter](https://discourse.vtk.org/u/dporter)\
**Post date:** [June 5, 2020, 6:14pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/3 "2020-06-05T18:14:20Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [June 8, 2020, 12:08pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/4 "2020-06-08T12:08:06Z")

</div>

> [@dporter](#):
>
> Do we use Ninja instead of CMake?

No, you tell CMake to use its Ninja generator.

> [@dporter](#):
>
> Any specific instructions on how to use Ninja to build VTK.

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.

---

<div class="post-metadata">

**Author:** ![dporter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dporter](https://discourse.vtk.org/u/dporter)\
**Post date:** [June 8, 2020, 3:06pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/5 "2020-06-08T15:06:20Z")

</div>

Thanks Ben, I’m so embarrassed. I don’t know what toolchain is and never heard of vcvarsall.bat. I’ll research those, thanks.

---

<div class="post-metadata">

**Author:** ![dporter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dporter](https://discourse.vtk.org/u/dporter)\
**Post date:** [June 8, 2020, 3:40pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/6 "2020-06-08T15:40:45Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)\
**Post date:** [June 8, 2020, 3:53pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/7 "2020-06-08T15:53:29Z")

</div>

> [@dporter](#):
>
> Anybody else out there besides you a me who use Java wrappers in Eclipse?

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).

---

<div class="post-metadata">

**Author:** ![dporter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dporter](https://discourse.vtk.org/u/dporter)\
**Post date:** [June 11, 2020, 3:32pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/8 "2020-06-11T15:32:15Z")

</div>

OK Ben, thanks.

---

<div class="post-metadata">

**Author:** ![dporter](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/d/b5ac83/32.png) [@dporter](https://discourse.vtk.org/u/dporter)\
**Post date:** [June 11, 2020, 3:33pm UTC](https://discourse.vtk.org/t/vtk-9-0-using-java-wrappers/3475/9 "2020-06-11T15:33:31Z")

</div>

I’m actually trying to implement FourPanesViewer in java.
