Error executing: java -Xms512M -Xmx1024M
$开发者_如何学Go 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
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.
What about export JAVA_OPTS="-Xms512M -Xmx1024M" (unix) or set JAVA_OPTS=-Xms512M -Xmx1024M (windows)?
Try This also :
java -Xms512M -Xmx1024M -classpath jar1.jar:jar2.jar packageName.YourMainClassName Arguments
精彩评论