执行错误:java -Xms512M -Xmx1024M

1 java memory-leaks

$ java -Xms512M -Xmx1024M
Run Code Online (Sandbox Code Playgroud)

在运行上面的命令时,我得到了以下错误.请帮我看看如何在AIX框中设置JVM堆内存.我在这里使用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
Run Code Online (Sandbox Code Playgroud)

Enn*_*oji 12

好吧,你必须执行一些java程序,而不仅仅是JVM.选项本身很好.尝试java -Xms512M -Xmx1024M -cp somejar.jar mystuff.Main什么的.