“insufficient memory for the Java Runtime Environment ” message in eclipse

后端 未结 10 1650
天命终不由人
天命终不由人 2020-12-08 03:51

When I run my Java code in Eclipse, I get the following message:

There is insufficient memory for the Java Runtime Environment to continue.
Native memory all         


        
10条回答
  •  余生分开走
    2020-12-08 04:29

    You need to diagnosis the jvm usages like how many process is running and what about heap allocation. there exists a lot of ways to do that for example

    • you can use java jcmd to check number of object, size of memory (for linux you can use for example "/usr/jdk1.8.0_25/bin/jcmd 19628 GC.class_histogram > /tmp/19628_ClassHistogram_1.txt", here 19628 is the running application process id). You can easily check if any strong reference exists in your code or else.

提交回复
热议问题