如何设置并查看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.如何查询堆的最大值和最小值?

...全文
1227 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
ttyy 2003-10-17
  • 打赏
  • 举报
回复
但是我用的是LINUX OS。
regnay 2003-10-16
  • 打赏
  • 举报
回复
jbuilder-->help-->about jbuilder-->info

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧