Setting Java heap space under Maven 2 on Windows

前端 未结 8 1164
情深已故
情深已故 2020-12-02 06:39

I get this message during build of my project

java.lang.OutOfMemoryError: Java heap space

How do I increase heap space, I\'ve

8条回答
  •  眼角桃花
    2020-12-02 07:30

    On windows:

    Add an environmental variable (in both system and user's variables, I have some weird problem, that it gets the var from various places, so I add them in both of them).

    Name it MAVEN_OPTS.

    Value will be: -Xms1024m -Xmx3000m -XX:MaxPermSize=1024m -XX:+CMSClassUnloadingEnabled

    The numbers can be different, make them relative to your mem size.

    I had that problem and this fixed it, nothing else!

提交回复
热议问题