chcp 936
936 中国 - 简体中文(GB2312)
Windows下
在JAVA 程序强制要UTF-8下,反而在命令行powershell 会出现乱码,因为powershell 默认是GB2312,要使得不产生乱码,在start.bat上添加chcp 65001
如下:
@echo off set JAVA_HOME=D:\Program Files\Java\TencentKona-11.0.16.b2 set Path=%JAVA_HOME%\bin;%Path% echo Starting the uaa server chcp 65001 java -server -Dfile.encoding=UTF-8 -Dspring.profiles.active=local -Dconfig.namespace=mine -Dconfig.group=DEFAULT_GROUP -Dconfig.server-addr=185.159.87.288:8848 -Ddiscovery.server-addr=185.159.87.288:8848 -Dsentinel.port=8719 -Dsentinel.dashboard=185.159.87.288:8081 -Xms1024m -Xmx1024m -Xmn256m -XX:+UseG1GC -XX:-OmitStackTraceInFastThrow -Xlog:gc*:gc.log:time,level,tags:filecount=50,filesize=100M -XX:+HeapDumpOnOutOfMemoryError -jar uaa.jar @pause