eclipse升级后启动失败:Heap堆内存不足
清泛原创
本来打算从Eclipse(2020-06)更新一下(2021-03),没想到升级成后Eclipse启动不了,错误日志如下:
更改 -Xmx521m 为 -Xmx3g
!SESSION 2021-06-16 17:03:13.186 -----------------------------------------------
eclipse.buildId=4.19.0.I20210303-1800
java.version=11.0.6
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Framework arguments: -product org.eclipse.epp.package.cpp.product
Command-line arguments: -os linux -ws gtk -arch x86_64 -product org.eclipse.epp.package.cpp.product
!ENTRY org.eclipse.osgi 4 0 2021-06-16 17:24:45.916
!MESSAGE Startup error
!STACK 1
java.lang.OutOfMemoryError: Java heap space
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.addWaiter(AbstractQueuedSynchronizer.java:651)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.doAcquireSharedNanos(AbstractQueuedSynchronizer.java:1060)
at java.base/java.util.concurrent.locks.AbstractQueuedSynchronizer.tryAcquireSharedNanos(AbstractQueuedSynchronizer.java:1369)
at java.base/java.util.concurrent.Semaphore.tryAcquire(Semaphore.java:415)
at org.eclipse.core.runtime.adaptor.EclipseStarter.updateSplash(EclipseStarter.java:1190)
at org.eclipse.core.runtime.adaptor.EclipseStarter.setStartLevel(EclipseStarter.java:1145)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:345)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:251)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590)
at org.eclipse.equinox.launcher.Main.run(Main.java:1461)
at org.eclipse.equinox.launcher.Main.main(Main.java:1434)
解决:修改 eclipse.ini更改 -Xmx521m 为 -Xmx3g
上一篇:[es6] import, export, default cheatsheet
下一篇:socks5代理工作流程及技术原理