加入收藏 | 设为首页 | 会员中心 | 我要投稿 济南站长网 (https://www.0531zz.com/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 服务器 > 搭建环境 > Windows > 正文

windows – 如何在配置文件中配置TomCat Java选项?

发布时间:2020-12-24 11:44:06 所属栏目:Windows 来源:网络整理
导读:我正在尝试为我正在部署的第三方应用程序配置传递到TomCat的 Java选项.该应用提供的说明如下: Open the Tomcat configuration tool from the Windows menu at Start All Programs Apache Tomcat Tomcat Configuration. Click Configure and select the Ja

我正在尝试为我正在部署的第三方应用程序配置传递到TomCat的 Java选项.该应用提供的说明如下:

  1. Open the Tomcat configuration tool from the Windows menu at Start > All
    Programs > Apache Tomcat > Tomcat Configuration.
  2. Click Configure and select the Java tab.
  3. At the bottom of the Java Options field,enter the following:
    -Dexample.license.directory="C:Program Filesexample"
  4. Stop and restart the application server.

但是,我需要以编程方式执行此操作,因此我想知道可以设置这些选项的配置文件.使用GUI对于将应用程序部署到其他开发人员的环境是不切实际的.

(如果相关,我正在使用Tomcat 6.0 …)

如果您使用Tomcat作为Windows服务,则可以通过转到bin目录并运行来调整JVM选项:
tomcat6 //US//MYSERVICENAME ++JvmOptions=-Dexample.license.directory="C:Program Filesexample"

在执行此操作之前关闭服务,并在完成后重新启动它.

我只是为我自己的tomcat服务器做了这个,它为我处理它.

(编辑:济南站长网)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!