---
title: "MAC下控制台启动tomcat中文乱码解决"
author: "showtime520"
date: "2013-11-30T10:12:06Z"
tags: []
categories: ["操作系统"]
slug: "mac-tomcat"
draft: false
lastmod: "2013-11-30T10:12:06Z"
id: 1983149
url: "https://showtime520.iteye.com/blog/1983149"
---

修改tomcat/bin/catclina.sh

```java

if [ -z "$logging_manager" ]; then
  JAVA_OPTS="$JAVA_OPTS -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Dfile.encoding=UTF-8"
else 
  JAVA_OPTS="$JAVA_OPTS $LOGGING_MANAGER -Dfile.encoding=UTF-8"
fi

# ----- Execute The Requested Command -----------------------------------------

```

找到Execute The Requested Command 这行，修改上面的JAVA_OPTS设值，添加-Dfile.encoding=UTF-8