locale -a
命令查看
export LANG="zh_CN.UTF-8"
export LANG='POSIX'
export LC_CTYPE='zh_CN.UTF-8'
Linux启动jar包,输出中文日志变成问号
java –Dfile.encoding=UTF-8
https://blog.csdn.net/yinaoxiao7661/article/details/88543903
https://blog.csdn.net/wo18237095579/article/details/84139673
https://www.php.cn/linux-441331.html
https://blog.csdn.net/Wang_TaiYang/article/details/122327874
https://blog.csdn.net/asdssssasd/article/details/81735962
https://blog.csdn.net/afgasdg/article/details/106661564
1、问题描述:
在linux中以命令启动jar包:
nohup java -jar indo-oss-sat.jar > indo-oss-sat.log 2>&1 &
- 1
启动后日志输出中文为??问号:
2、问题解决
启动命令中加入:-Dfile.encoding=utf-8
启动命令变为:
nohup java -Dfile.encoding=utf-8 -jar indo-oss-sat.jar > indo-oss-sat.log 2>&1 &
- 1