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?
javaw.exe is a legitimate file from Sun Microsystems. It is an executable file used for displaying error messages, if they occur while installing any application. It's an essential Java file and it is typically located in c:\program by default.
Purpose. The java and javaw tools start a Java™ application by starting a Java Runtime Environment and loading a specified class. The javaw command is identical to java, except that javaw has no associated console window. Use javaw when you do not want a command prompt window to be displayed.
Both java.exe and javaw.exe can execute java programs including jar file, the only difference is that with java.exe you have a console executed and you need to wait until your java program finishes to run any other command on the other hand in case of javaw.exe no console or window is associated with execution.
Java is also a very high-level Object-Oriented programming language (OOP) which means that while the application code itself is much easier to maintain, the objects that are instantiated will use that much more memory.
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.
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 love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With