# Minimum java version

**URL:** https://discourse.vtk.org/t/minimum-java-version/5173
**Category:** Support
**Created:** [February 11, 2021, 7:42am UTC](https://discourse.vtk.org/t/minimum-java-version/5173 "2021-02-11T07:42:27Z")
**Posts on this page:** 10
**Page:** 1

<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: [February 11, 2021, 7:42am UTC](https://discourse.vtk.org/t/minimum-java-version/5173/1 "2021-02-11T07:42:27Z")

</div>

Does VTK require a minimum version of Java to compile its wrapper code?

---

<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: [February 11, 2021, 3:03pm UTC](https://discourse.vtk.org/t/minimum-java-version/5173/2 "2021-02-11T15:03:24Z")

</div>

I think 1.6 or 1.7 is mentioned? It should work with pretty old versions and may have various deprecation warnings from newer versions.

Cc: @dgobbi

---

<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: [February 11, 2021, 3:17pm UTC](https://discourse.vtk.org/t/minimum-java-version/5173/3 "2021-02-11T15:17:45Z")

</div>

The wrappers should build with JDK 1.6 up to JDK 1.11 at least.

---

<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: [February 11, 2021, 11:32pm UTC](https://discourse.vtk.org/t/minimum-java-version/5173/4 "2021-02-11T23:32:42Z")

</div>

Ok. Thanks guys.

So hopefully no one would mind a minimum requirement of Java version 1.7 then?

I’m working on an MR to significantly improve the efficiency of the Java wrappers with respect to string handling for utf8 conversion. It uses StandardCharsets, which is supported for 1.7+

---

<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: [February 11, 2021, 11:57pm UTC](https://discourse.vtk.org/t/minimum-java-version/5173/5 "2021-02-11T23:57:30Z")

</div>

That sounds fine to me. Java 6 _extended_ support ended in 2018.

---

<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: [February 12, 2021, 12:05am UTC](https://discourse.vtk.org/t/minimum-java-version/5173/6 "2021-02-12T00:05:46Z")

</div>

I see no issues with moving to 1.7. The last time I built against 1.6 would have been back in 2018, I think.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [February 13, 2021, 4:17am UTC](https://discourse.vtk.org/t/minimum-java-version/5173/7 "2021-02-13T04:17:00Z")

</div>

From memory I have built VTK with Java 12 way back in 2019. I think that there were a few deprecation warnings, however as I wasn’t really using Java except for testing VTK Examples I stopped enabling the wrapping as it takes a very long time to build in comparison to the Python wrapping.

---

<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: [February 13, 2021, 4:30am UTC](https://discourse.vtk.org/t/minimum-java-version/5173/8 "2021-02-13T04:30:56Z")

</div>

Building the Java wrappers is quick on Windows with VS, but terribly slow on Linux with vscode.

I don’t know if it’s because I’m using a VM for Linux, or the different compilers and OS.

---

<div class="post-metadata">

### Author: ![amaclean](https://discourse.vtk.org/user_avatar/discourse.vtk.org/amaclean/32/224_2.png) [@amaclean](https://discourse.vtk.org/u/amaclean)
#### Post date: [February 13, 2021, 4:36am UTC](https://discourse.vtk.org/t/minimum-java-version/5173/9 "2021-02-13T04:36:07Z")

</div>

I was building with VS2019/ninja on Windows and on Linux using gcc/ninja, so these were native systems not VM. The builds did take a while but I don’t remember whether Linux took longer or Windows 10 took longer. However the building did take a long time.

---

<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: [February 15, 2021, 5:47am UTC](https://discourse.vtk.org/t/minimum-java-version/5173/10 "2021-02-15T05:47:58Z")

</div>

Here’s the associated MR [https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/7628](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/7628)
