aspose file tools*
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
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: 8912
    
    8

"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: 8912
    
    8

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: 8912
    
    8

It wouldn't DO anything because the VM wouldn't run.
 
Don't get me started about those stupid light bulbs.
 
subject: JVM memeory allocation