How do I set the JVM memory allocation for a class that has not main method? I have an application, where a class is invoked from a startup servlet. How do I set the memory allocation for this application? Eg. java -mx 20m myClass is for a specific class. How do I set it for an application?
As I said in the previous thread, you need to pass the "java" command the name of a class, otherwise it doesn't do anything. I get the impression you are trying to "set" some property on the "java" command in order to solve your OutOfMemoryException It doesn't work that way. The "java" command takes arguments only for the current run. Even if you started two VM's with different arguments, the arguments of the one would not effect the other. And as for syntax, you have it correct in the first message of this thread. [ October 28, 2003: Message edited by: Joe Ess ]