Reputation: 11
$ java -Xms512M -Xmx1024M
While running the above command I got the error below. Please help me how to set JVM Heap memory in AIX box. Here I'm using java 5.
Usage: java [-options] class [args...]
(to execute a class) or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-cp -classpath <directories and zip/jar files separated by :>
set search path for application classes and resources
-D<name>=<value>
set a system property
-verbose[:class|gc|jni]
enable verbose output
-version print product version
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
Upvotes: 1
Views: 16002
Reputation: 3549
Try This also :
java -Xms512M -Xmx1024M -classpath jar1.jar:jar2.jar packageName.YourMainClassName Arguments
Upvotes: 0
Reputation: 4682
What about export JAVA_OPTS="-Xms512M -Xmx1024M" (unix) or set JAVA_OPTS=-Xms512M -Xmx1024M (windows)?
Upvotes: 0
Reputation: 26882
Well, you have to execute SOME java program, not just the JVM. The options itself are fine. Try java -Xms512M -Xmx1024M -cp somejar.jar mystuff.Main
or something.
Upvotes: 12