具体错误
[ERROR] Failed to execute goal org.teavm:teavm-maven-plugin:0.6.0-SNAPSHOT:compile (wasm-client) on project teavm-samples-benchmark: Unexpected error occurred: Not enough memory to allocate buffers for rehashing: 0 -> 8,192: Java heap space -> [Help 1]
找到mvn的位置
whereis mvn
编辑mvn
找到MAVEN_OPTS的定义位置,在之后加入一句:
MAVEN_OPTS="`concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config"` $MAVEN_OPTS"
# 增加这一句,加大内存,充分利用。
MAVEN_OPTS="${MAVEN_OPTS} -Xmx16384m"
windows同理。