Why does the JRE use so much memory?
843811Apr 7 2004 — edited Apr 8 2004I know this question has been asked a million times in one form or another but I have not seen a complete answer yet. When I compile and run the following code under WindowsXP pro, it appears that the JRE is using 3.1MB or RAM. When I run a similar program using C++ the program only uses 630k.
public class HelloWorld
{
public static void main(String args[])
{
System.out.println("Hello World");
}
}
Why 3MB to show "HelloWorld"? I love Java, it is much easier and more enjoyable to develop with but our applications appear to use large amounts of memory. I realize that making calls to the runtime object to check the amount of "heap" memory we are using will probably show much less memory being used but Task Manager shows 3MB. It is sometimes hard to convince my fellow developers of he benefits of Java when there are strange issues like this.
Thanks in advance