Does javaw.exe eat my memory?

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

I have about 40-50 of these javaw.exe processes each taking up 22K-26K of RAM, which ultimately eats up 70-80% of my 8GB of RAM on my machine. This is very unpleasant because I cannot work like that. I was wondering if anyone else has experienced this and knows how to fix this problem?

+4
source share
4 answers

You probably run 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 processes that should no longer start.

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

+10
source

This usually happens when you are doing multithreading. Make sure you stop all threads that you created by calling thread.interrupt() on the threads you spawned before terminating the application. This will remove javaw.exe from your task manager - hope it will be useful

+2
source

If you are using JFrame, try the following:

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

Typically, each eclipse instance should have only one javaw.exe process. Therefore, check with the help of the process guide that they actually belong to the eclipse, and not some other background / zombie programs.

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

Please note that this will reduce memory usage only for the actual eclipse javaw.exe process.

0
source

Source: https://habr.com/ru/post/1438482/


All Articles