# Java Wrapping broken?

**URL:** https://discourse.vtk.org/t/java-wrapping-broken/15083
**Category:** Support
**Created:** [December 28, 2024, 4:12pm UTC](https://discourse.vtk.org/t/java-wrapping-broken/15083 "2024-12-28T16:12:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![metamurk](https://discourse.vtk.org/user_avatar/discourse.vtk.org/metamurk/32/9665_2.png) [@metamurk](https://discourse.vtk.org/u/metamurk)
#### Post date: [December 28, 2024, 4:12pm UTC](https://discourse.vtk.org/t/java-wrapping-broken/15083/1 "2024-12-28T16:12:15Z")

</div>

Hello together,

Is it possible that Java wrapping is broken? l tried it the staigthforward way:  
Downloading 9.4.0

- Setting up Cmake.
- Here it wants a Javah! This is super outdated and does not exist anymore since 10 years.  
Anyway, I tried a modern and an old jdk.
- I cannot build with Java Wrapping in VisualStudio. It creates something, but not all classes and also no jar archive.
- It shows 120 errors in VS, all like CMake returns 1 for the single projects.

Is vtk still working on java?

---

<div class="post-metadata">

### Author: ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)
#### Post date: [December 30, 2024, 10:34pm UTC](https://discourse.vtk.org/t/java-wrapping-broken/15083/2 "2024-12-30T22:34:25Z")

</div>

> [@Building vtk 9.4.0 on windows Java](https://discourse.vtk.org/t/building-vtk-9-4-0-on-windows-java/14936/54):
>
> I have a fix here that will go into 9.4.1: [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/11766](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/11766)

---

<div class="post-metadata">

### Author: ![dgobbi](https://discourse.vtk.org/user_avatar/discourse.vtk.org/dgobbi/32/18_2.png) [@dgobbi](https://discourse.vtk.org/u/dgobbi)
#### Post date: [December 30, 2024, 10:47pm UTC](https://discourse.vtk.org/t/java-wrapping-broken/15083/3 "2024-12-30T22:47:25Z")

</div>

> I have a fix here that will go into 9.4.1:

Context: that only fixed the missing dependency files for Visual Studio builds. It didn’t fix the .jar files or anything else.

---

<div class="post-metadata">

### Author: ![toddy](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/t/edb3f5/32.png) [@toddy](https://discourse.vtk.org/u/toddy)
#### Post date: [December 30, 2024, 11:25pm UTC](https://discourse.vtk.org/t/java-wrapping-broken/15083/4 "2024-12-30T23:25:54Z")

</div>

What JDK version are you using? It must be at least 1.8

> [@VTK 9 and Java- vtk.jar not automatically generated. Also location of wrapper dlls](https://discourse.vtk.org/t/vtk-9-and-java-vtk-jar-not-automatically-generated-also-location-of-wrapper-dlls/3354/19):
>
> That should be cd $vtk\_build\_dir\Wrapping\Java dir /s/B \*.java \>javafiles javac -d ..\..\java @javafiles cd ..\..\java jar --create -f ..\lib\java\vtk.jar vtk\*.class then run cd $vtk\_build\_dir\Wrapping\Java\vtk\sample java -cp $vtk\_build\_dir\lib\java\vtk.jar Demo.java
