• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JVM memeory allocation

 
Blikkies Marais
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"myApp" is supposed to be the full class name of the class where you have "public static void main(String args[])" declared.
 
Blikkies Marais
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I set the memory for my entire application?
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That sets up the memory for the entire VM and executes the main() method of the given class.
 
Blikkies Marais
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you do not want it to execute any classes main method, is it possible?
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It wouldn't DO anything because the VM wouldn't run.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic