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

从 Markdown 生成 Pdf

BracketsMarkdown 写完简历后,想到需要将 markdown 文件转为其他格式才能作为简历分发出去。这其他格式,就支持程度来说,自然是 PDF 了。于是乎,google 之,大概有两种思路:

  1. 将 markdown 文件直接转化为 PDF,可以使用 pandoc
  2. 将 markdown 文件转化为 HTML ,然后将 HTML 转化为 PDF ,可以使用 markedphantomjs

第一种思路

  • 下载并安装 pandoc for win
  • 下载并安装 MiKTeX for win
  • 安装完后所需工具会自动添加到系统路径中去
  • 下载 这个模板,以支持中文的自动换行等
  • 用文本编辑器(我用的是 Sublime Text 3)打开 pm-template.latex,找到这一行:

Read More