• Post Reply Bookmark Topic Watch Topic
  • New Topic

increase jvm size in linux  RSS feed

 
anwesh maity
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI i want to increase the JVM size in red hat linux 5 using a .sh file.

I hav written the comand in my .sh file as

#!/bin/sh
export JAVA_OPTIONS="-Xss2M"

its not increasing the JVM size please suggest what command has to be there to change the JVM size on executing a .sh file its urgent
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16060
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The -Xss option sets the stack size, not the size of the heap (where objects are allocated). Use the -Xms and -Xmx options to set the minimum and maximum heap size.

Note that Java does not use the JAVA_OPTIONS environment variable, so setting it has no effect for Java itself. Some other programs may use this, though. You can specify the sizes on the command line in the java command, for example:

java -Xmx512M org.mypackage.MyProgram

to give the program a max. heap size of 512 MB.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!