Setting Java heap space under Maven 2 on Windows

前端 未结 8 1161
情深已故
情深已故 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条回答
  • It worked - To change in Eclipse, go to Window -> Preferences -> Java -> Installed JREs. Select the checked JRE/JDK and click edit.

    Default VM Arguments = -Xms128m -Xmx1024m

    0 讨论(0)
  • 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!

    0 讨论(0)
提交回复
热议问题