如何设置并查看java中JVM堆(heap)的大小?
ttyy 2003-10-16 05:51:08 1.如何设置heap的大小,我使用如下的方法时出现如下信息,我想肯定没有成功。
$ java -Xmx256m
Usage: java [-options] class [args...]
(to execute a class)
or java -jar [-options] jarfile [args...]
(to execute a jar file)
where options include:
-client to select the "client" VM
-hotspot is a synonym for the "hotspot" VM [deprecated]
-server to select the "server" VM
-classic to select the "classic" VM
If present, the option to select the VM must be first.
The default VM is -client.
-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 and exit
-showversion print product version and continue
-? -help print this help message
-X print help on non-standard options
2.如何查询堆的最大值和最小值?