Java heap size error?


Is anyone familiar with this type of error? I’m trying to compile a large HaXe+OpenFL program using Haxedevelop, targeting HTML5 set to RELEASE and -FINAL and this error gets thrown:

Seems to run fine when not set to -final but I need the reduction in size.



-final builds use Google Closure for minification by default, which uses Java, so that’s likely where the error is from.

A possible workaround would be to run a different minifier (or the same one, but with increased heap space by passing appropriate args to Java?) on the output manually. You would also want to enable DCE (which final normally implies).



Thank you, Gama11. I’m not sure exactly what you mean, but I’ll do some research to see what I can come up with.



What would be a simple way to pass this data to Java? I’ve searched and cannot find the right commands/code. I know it might look something like this -Xmx100m, but am a bit unsure how to go about this within the program itself.