Error in idea compilation: java.lang.OutOfMemoryError Java heap space and java.lang.StackOverflowError

noun explanation java.lang.OutOfMemoryError Out of memory error
0 java.lang.StackOverflowError Stack overflow error

When developing applications with IntelliJ idea, If you compile a large amount of code, you will encounter
problems java.lang.OutOfMemoryError : Java heap space
error:

the usual solution is as follows
1. Click file setting search compiler

2. Change the value of “bulk process heap size (Mbytes)” to 2048

2 and java.lang.StackOverflowError Usually due to the program loop, infinite recursion. But I have also encountered a situation, not set the JVM parameters

The solution is as follows:
1. Click Tomcat – select Edit configurations

2. Select VM options as shown in the figure

the settings are as follows:
1- Ddruid.log.stmt .executableSql=true
-server
-Xms1024m
-Xmx1024m
-XX:MaxNewSize=512m
-XX:PermSize=128m
-XX:MaxPermSize=256m
-noverify
– Drebel.spring_ plugin=true
– Drebel.mybatis_ plugin=true
– Drebel.log4j -plugin=true
– Drebel.disable_ update=true`

click “apply” – “OK”


Read More: