Maven heap space

后端 未结 2 808
我在风中等你
我在风中等你 2021-01-02 17:42

When I am running mvn clean install for my build on linux RHEL 6. I\'m getting the following error: java.lang.outOfMemoryError heap space.

2条回答
  •  隐瞒了意图╮
    2021-01-02 17:53

    When I am running mvn clean install for my build on linux RHEL 6 it is showing java.lang.outOfMemoryError heap space.

    You need to set the MAVEN_OPTS environment variable.

    I have read all the articles on internet

    That is false. At best you have read a TINY FRACTION of the relevant articles.

    ... and in my machine I don't have mvn.sh, I have mvn.bat

    If you have used "yum" to install Maven, then there will be a "mvn" command on your command path. On my system, it is a shell script. If you were going to "hack" a script, that would what you would edit.

    But you shouldn't need to.

    and where to set export MAVEN_OPTS COMMAND.

    This is a very basic "How to use a Linux command shell" question.

    The answer is either you type is at the command prompt before you run the "mvn" command, or you add it to your shell initialization file and restart the shell as appropriate.


    My advice would be to invest some time in reading a tutorial about how to use the Linux command shell. It will save you a lot of time in the long term.

提交回复
热议问题