我在哪里可以永久设置Windows PC上的Java堆大小? [英] Where can I permanently set java heap size on Windows pc?

查看:90
本文介绍了我在哪里可以永久设置Windows PC上的Java堆大小?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近下载了最新的Java 1.6 JDK。我正在使用SDK附带的VisualVM在我的本地电脑上测试/监控我的webapp(使用Tomcat服务器)。我正在运行Windows XP。

I recently downloaded the latest Java 1.6 JDK. I'm using VisualVM which came with the SDK to test/monitor my webapp (using Tomcat server) on my local pc. I'm running Windows XP.

用于设置min的参数位于何处。最多java堆大小? VisualVM表示最大值。堆大约是256mb。我在server.xml文件中查找了Tomcat,但没有找到任何设置。

Where are the parameters located for setting the min. and max. java heap size? VisualVM indicates that the max. heap is at about 256mb. I looked in the server.xml file for Tomcat, but didn't find any settings in there.

谢谢

推荐答案

您可以使用JAVA_OPTS环境变量来处理Java堆大小。
此变量可以添加为环境变量,也可以在 startup.bat 文件中定义配置行。

You can use the JAVA_OPTS environment variable for dealing with java heap size. This variable can be added as a environment variable as well as you can define a configuration line in the startup.bat file.

startup.bat 文件中添加以下行。

set JAVA_OPTS=-Xms512m -Xmx512m

你可以将其添加为环境变量,如上所述。

You can add this as environment variable as said.

这篇关于我在哪里可以永久设置Windows PC上的Java堆大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆