Java heap size error?

#1

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.

0 Likes

#2

-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).

0 Likes

#3

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.

0 Likes

#4

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.

0 Likes