When trying to build Apache FOP by ant on the command line, it complains:
[javac] The system is out of resources.
[javac] Consult the following stack trace for details.
[javac] ...
[javac] at com.sun.tools.javac.main.Main.compile(Main.java:353)
I don’t understand. I have enough RAM, how can the system run out of resources?
You need to give more memory to your JVM. e.g. the below allocates 512Mb to the JVM.
The Java virtual machine runs with a fixed maximum memory size. For memory-intensive operations you need to increase this appropriately.
-Xmxspecifies the maximum amount of memory the JVM will take.-Xmsspecifies the amount of memory the JVM allocates on start-up.There’s a nice summary of options here.
Note: Given the above occurs via Ant, you may need to increase the memory available to Ant (e.g.
set ANT_OPTS=-Xms256M -Xmx512M), and/or the memory available to yourjavacprocess if that’s being forked as a separate executable.