简体   繁体   English

Tomcat 7 日志包含“-Dfile.encoding=Cp1252”:它来自哪里?

[英]Tomcat 7 log contains “-Dfile.encoding=Cp1252”: where does it come from?

I have a Tomcat 7.0.69 instance running inside Eclipse for Java (not JEE) 4.5.2 on Windows 10 - although I saw this on a JEE IDE or in other 7.0.x versions of Tomcat too.我有一个 Tomcat 7.0.69 实例在 Windows 10 上的 Eclipse for Java(非 JEE)4.5.2 中运行 - 尽管我也在 JEE IDE 或其他 7.0.x 版本的 Tomcat 中看到了这个。

When I start a server instance in debug mode, I have this line in the console view:当我在调试模式下启动服务器实例时,控制台视图中有这一行:

Informazioni: Command line argument: -Dfile.encoding=Cp1252

But I can't find any setting or preference that would add or change that parameter.但是我找不到任何可以添加或更改该参数的设置或首选项。

For completeness, I also have these为了完整起见,我还有这些

Informazioni: Command line argument: -Djdk.tls.client.protocols=TLSv1.1
Informazioni: Command line argument: -Dhttps.protocols=TLSv1.1,TLSv1.2

And both come from the server launch configuration Arguments tab, where for VM arguments I have:两者都来自服务器启动配置参数选项卡,对于 VM 参数,我有:

-Dcatalina.base="C:\workspace-4.5.2-java\.metadata\.plugins\org.eclipse.wst.server.core\tmp2" -Dcatalina.home="C:\tools\tomcat\apache-tomcat-7.0.69" -Dwtp.deploy="C:\workspace-4.5.2-java\.metadata\.plugins\org.eclipse.wst.server.core\tmp2\wtpwebapps" -Djava.endorsed.dirs="C:\tools\tomcat\apache-tomcat-7.0.69\endorsed"
-Djdk.tls.client.protocols=TLSv1.1
-Dhttps.protocols=TLSv1.1,TLSv1.2

These are my Java* env variables:这些是我的Java*变量:

C:\Program Files (x86)\Windows Resource Kits\Tools>set java
JAVA_HOME=C:\Programmi\java\jdk1.7.0_51

(ie I have no JAVA_OPTS). (即我没有 JAVA_OPTS)。

Any hint?任何提示?

Since you're running Tomcat from Eclipse that's something it adds based on your default OS encoding.由于您从 Eclipse 运行 Tomcat,因此它会根据您的默认操作系统编码添加一些内容。 You can change it from the workspace preferences if you need to如果需要,您可以从工作区首选项中更改它

在此处输入图片说明

You can find the setting in Common page of Run/Debug Configurations .您可以在Run/Debug Configurations Common页面中找到该设置。
The default value is inherited from Text file encoding of workspace.默认值继承自工作区的文本文件编码 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM