You need to tell java it can use more memory then is available

For example for maven itself you can
# export MAVEN_OPTS=-Xmx2g

You don't really say what part of the build gives the error, could be maven 
itself, the java compiler, java process running the unit tests, many others, 
each of these may need different configuration to increase the allowed memory 
usage.

Regards

On Thu, Mar 3, 2022, at 14:13, John Rinehart wrote:
> I'm trying to build an application (dbeaver) on a VPS with limited physical
> resources (~1GiB of RAM). To compensate I've set up 8GiB of swap space.
> Trying to build dbeaver always results in a Java heap space error. None of
> my swap is being used, though. I already tried to change the kernel
> swappiness values to fix this, but it hasn't. Once the physical memory is
> exhausted the build fails.
> 
> How can I ensure that swap space is used for maven builds?
> 
> -- John Rinehart
> 

Reply via email to