*
The moose likes Beginning Java and the fly likes JVM memeory allocation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "JVM memeory allocation" Watch "JVM memeory allocation" New topic
Author

JVM memeory allocation

Blikkies Marais
Ranch Hand

Joined: Jun 12, 2003
Posts: 50
Hi
I am trying to set the JVM memory allocation. I have tried:
java -Xms256m -Xmx512m
But I think I need to do:
java -Xms256m -Xmx512m myApp
but how do I know what myApp should be?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8834
    
    7

"myApp" is supposed to be the full class name of the class where you have "public static void main(String args[])" declared.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
Blikkies Marais
Ranch Hand

Joined: Jun 12, 2003
Posts: 50
How do I set the memory for my entire application?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8834
    
    7

That sets up the memory for the entire VM and executes the main() method of the given class.
Blikkies Marais
Ranch Hand

Joined: Jun 12, 2003
Posts: 50
If you do not want it to execute any classes main method, is it possible?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8834
    
    7

It wouldn't DO anything because the VM wouldn't run.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JVM memeory allocation
 
Similar Threads
OutOfMemoryError in weblogic
Max No of Elements in Array?
SIGSEGV 11 / SIGABRT 6
Jboss Memory out of error when generating BIRT Reports
Out of memory error