I have a web start application that can run in 1GB of memory, but it runs quite a bit faster for certain tasks if it has 4GB of memory. So I want to use 4GB when I can... i.e., on 64-bit JVMs.
Is it possible to do this? Is there a way in the JNLP file to specify the max heap for 32-bit JVMs and 64-bit JVMs separately?
Update
I tried a JNLP file with these lines:
<resources>
<j2se version="1.8+" java-vm-args="-XX:+UseParallelGC -XX:+HeapDumpOnOutOfMemoryError"/>
</resources>
<resources os="Windows" arch="x86">
<j2se href="http://java.sun.com/products/autodl/j2se" onclick="javascript:mytracker(this.href);" version="1.8+"
max-heap-size="1024m"/>
</resources>
<resources os="Windows" arch="x86_64">
<j2se href="http://java.sun.com/products/autodl/j2se" onclick="javascript:mytracker(this.href);" version="1.8+"
max-heap-size="4096m"/>
</resources>
It did not work. Other lines in the architecture specific resources blocks did work, so I know the resources blocks with the "arch" attribute are correctly identified and used. I removed those other lines in this post for brevity.