How to solve “java.io.IOException: error=12, Cannot allocate memory” calling Runtime#exec()? March 3, 2023 by Tarik This is the solution but you have to set: echo 1 > /proc/sys/vm/overcommit_memory