Article directory
1. Reproducing the error
When starting the project today, the following error was reported:
Right nowError:java: java.lang.OutOfMemoryError: WrappedJavaFileObject[org.jetbrains.jps.javac.InputFileObject[file:xxx.java]]@pos242:@pos242: GC overhead limit exceeded
2. Analysis errors
Translate the error Error:java: java.lang.OutOfMemoryError: WrappedJavaFileObject[org.jetbrains.jps.javac.InputFileObject[file:xxx.java]]@pos242:@pos242: GC overhead limit exceeded
into Chinese, as shown below:
According to the translation results, GC
the overhead limit is exceeded, that is, there is insufficient memory.
At the same time, according to this statement org.jetbrains.jps.javac.InputFileObject
, this is jetbrains
an error reported, that is, idea
an error reported by my editor. The memory can be configured in the idea editor.
3. Solve the problem
- Use shortcut keys
Ctrl + Alt + S
to openSettings
a panel:
Of course, if your shortcut keys conflict, you can use them File --> Settings
, as shown in the figure below:
- turn up
Build,Execution,Deployment --> Complier
In Build process heap size (Mbytes):
the corresponding text section, set a larger compilation memory. By default 700M
, it can be gradually increased according to the actual situation.
I set a larger compilation memory to 1200
, readers can set it according to the actual situation.
Of course, some may be named Shared build process heap size (Mbytes):
instead, Build process heap size (Mbytes):
as shown in the figure below:
- If the configuration is completed, it can be started successfully
idea
: