Chinese Character Problem With 'Javac' and 'Javap' in Mac Shell

To learn the class initialization process of java, I get this article from google. However, when I write the code to a local file and compile it with javac, I get some encoding problem with the output. The same problem happens when I run javap as well.

I can find the solution here and here. This is what I adopt:

1
2
3
4
5
6
JAVA_OPTS="${JAVA_OPTS} -Dfile.encoding=UTF-8"
# JAVA_OPTS="${JAVA_OPTS} -Dclient.encoding.override=UTF-8"
export JAVA_OPTS
JAVA_TOOL_OPTIONS="${JAVA_TOOL_OPTIONS} -Dfile.encoding=UTF-8"
export JAVA_TOOL_OPTIONS

Install Tomcat on Mac Os X

  1. This doc is a modified copy of this one with serveral changes.
  2. The steps here are tested on Mavericks.

This tutorial explains how to install the Apache Tomcat 6.0.x on Mac OS X 10.5 or 10.6. This document is not tested to work with other versions of Tomcat or Java. For complete details, please consult the specific documentation for those software installations.

Read More