When i create a new project in "Eclipse" IDE.Suddenly it shows an alert message "Out of memory error".I cannot identify the reason. If any one know the reason please tell me.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
If you are running Eclipse on Mac OS X then
Right click on
eclipse.app
iconClick on
Show Package Contents
Open
eclipse.ini
fileChange below parameters
Add below parameters
The most obvious explanation is that you are truly out of memory. In which case starting Eclipse with a bigger heap should help
varying the 256M to see what works for you.
I would not expect to see this problem if you have just a few simple projects. If you are using additional plugins then conceivably the amount of heap you need may need to be increased.
Try to start eclipse with follow paramenters:
Or justify these parameters for your requirements
Not sure if relevant to your problem, but I just had a similar problem with a Swing project using OpenJDK 7.
After several cycles of starting (the
Run
button) and closing ('X'
/Alt+F4
) my application, I got this error in the console:And sometimes, I got another sort of error:
and then, if I tried to run it once more, Java crashed:
top
revealed the cause of the problem (notice virtual memory usage):These were all instances of my application, which had not been closed. Still not sure why so much virtual memory was allocated per instance - probably there's some option for that. (I have 3GiB of physical memory, by the way).
Here's my main() method:
I saw the commented line in a tutorial and specifically disabled it to see what would happen. What happened was that that it defaulted to
HIDE_ON_CLOSE
, which did not close and dispose of the frame.Setting
setDefaultCloseOperation
to EXIT_ON_CLOSE was the solution for me. Interested to see input from more knowledgeable people on this, though.