Question

Recently, javaw.exe processes have been taking over my computer and forcing me to exit out Eclipse and other applications due to low memory errors. Note that I am not maxing out the system at all, and am I working on some basic java programs, and I have 2-3 eclipse tabs open at a time max.

I have about 40-50 of these javaw.exe processes each take up 22K-26K of RAM, which eventually eats up 70-80% of my 8GB RAM on my machine. This is extremely frustrating as I cannot do any work like this. I was wondering if anyone else has experienced this and knows how to troubleshoot this problem?

Was it helpful?

Solution

You probably launch the same program again and again from eclipse, and these programs never exit. Switch to the Debug perspective, and look at the Debug view. Kill all the processes that should not run anymore.

That said, 50 * 26KB is very very far from 8GB * 80%. And I doubt any Java program can be as light as 26KB.

OTHER TIPS

It normally happens when you are doing multi threading. Make sure you stop all the threads which you have created by calling a thread.interrupt() for the the threads you have spawned before you end the application. That would remove javaw.exe from your Task Manager - Hope this will be helpful

If you are using JFrame, try this:

Main frame=new Main();//Main class extends JFrame.
frame.setdefaultcloseoperation(JFrame.EXIT_ON_CLOSE);

Normally each eclipse instance should only have one javaw.exe process.. so check with a process explorer that they actually belong to eclipse and not some other background/zombie programs.

If you want to reduce javaw.exe memory, you can use Help -> Performance -> Reducy Memory now..

Note that this will reduce the used memory only of the actual eclipse's javaw.exe process..

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top