# Java issues with Windows Server 2016

**URL:** https://forum.servoy.com/t/java-issues-with-windows-server-2016/19172
**Category:** Classic Servoy
**Created:** [March 12, 2017, 5:13pm UTC](https://forum.servoy.com/t/java-issues-with-windows-server-2016/19172 "2017-03-12T17:13:07Z")
**Posts on this page:** 2
**Page:** 2

<div class="post-metadata">

### Author: ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)
#### Post date: [March 28, 2017, 8:17am UTC](https://forum.servoy.com/t/java-issues-with-windows-server-2016/19172/21 "2017-03-28T08:17:54Z")

</div>

that should be fine except that 640M for the metaspace is quite a lot

if you are using java8 then you only need to have this:

wrapper.java.additional.1=-Djava.awt.headless=true  
wrapper.java.additional.2=-Duser.dir=“C:\Servoy\application\_server”  
wrapper.java.additional.3=-Djava.io.tmpdir=“C:\Servoy\application\_server\server\work”  
wrapper.java.additional.4=-XX:MetaspaceSize=200M  
wrapper.java.additional.5=-XX:MaxMetaspaceSize=200M  
wrapper.java.additional.6=-XX:MinMetaspaceFreeRatio=0  
wrapper.java.additional.7=-XX:MaxMetaspaceFreeRatio=100  
wrapper.java.additional.8=-XX:+UseG1GC

---

<div class="post-metadata">

### Author: ![sbutler](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/sbutler/32/4393_2.png) [@sbutler](https://forum.servoy.com/u/sbutler)
#### Post date: [March 29, 2017, 1:56am UTC](https://forum.servoy.com/t/java-issues-with-windows-server-2016/19172/22 "2017-03-29T01:56:49Z")

</div>

I would also suggest not using hard coded memory values, and instead using the percent values. Servoy should really change their default install to use this. In the modern cloud era, with memory easily scalable up and down, you don’t have to have to change your config each time you adjust memory.

```auto
# Initial Java Heap Size (in MB)
wrapper.java.initmemory=32

# Maximum Java Heap Size (in MB)
wrapper.java.maxmemory=1280

```

And instead use these. Adjust those based on your usage (if its a dedicated Servoy server, these may be ok, but if you run the DB server on the same box, you’ll want to adjust the max memory down)

```auto
# Initial Java Heap Size (in % of physical memory available on the system)
wrapper.java.initmemory.percent=10

# Maximum Java Heap Size (in % of physical memory available on the system)
wrapper.java.maxmemory.percent=70

```

[Previous page](https://forum.servoy.com/t/java-issues-with-windows-server-2016/19172.md?page=1)
