Fix build Java errors caused by UTF-8 characters in source comments

See issue #534
diff --git a/contrib/packages/deb/ubuntu-precise/debian/rules b/contrib/packages/deb/ubuntu-precise/debian/rules
index f803861..7d5f4ac 100755
--- a/contrib/packages/deb/ubuntu-precise/debian/rules
+++ b/contrib/packages/deb/ubuntu-precise/debian/rules
@@ -144,7 +144,7 @@
 	#  anything for this package.
 	#/usr/bin/docbook-to-man debian/vnc.sgml > vnc.1
 	(cd media;make)
-	(cd java;cmake -G"Unix Makefiles";JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make)
+	(cd java;cmake -G"Unix Makefiles";make)
 
 	touch build-indep-stamp
 
diff --git a/contrib/packages/deb/ubuntu-trusty/debian/rules b/contrib/packages/deb/ubuntu-trusty/debian/rules
index 3811477..08e974c 100755
--- a/contrib/packages/deb/ubuntu-trusty/debian/rules
+++ b/contrib/packages/deb/ubuntu-trusty/debian/rules
@@ -151,7 +151,7 @@
 	#  anything for this package.
 	#/usr/bin/docbook-to-man debian/vnc.sgml > vnc.1
 	(cd media;make)
-	(cd java;cmake -G"Unix Makefiles";JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make)
+	(cd java;cmake -G"Unix Makefiles";make)
 
 	touch build-indep-stamp
 
diff --git a/contrib/packages/deb/ubuntu-xenial/debian/rules b/contrib/packages/deb/ubuntu-xenial/debian/rules
index 1a7a20b..531a1c4 100644
--- a/contrib/packages/deb/ubuntu-xenial/debian/rules
+++ b/contrib/packages/deb/ubuntu-xenial/debian/rules
@@ -138,7 +138,7 @@
 	#  anything for this package.
 	#/usr/bin/docbook-to-man debian/vnc.sgml > vnc.1
 	(cd media;make)
-	(cd java;cmake -G"Unix Makefiles";JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make)
+	(cd java;cmake -G"Unix Makefiles";make)
 
 	touch build-indep-stamp
 
diff --git a/contrib/packages/rpm/el6/SPECS/tigervnc.spec b/contrib/packages/rpm/el6/SPECS/tigervnc.spec
index 447eb7f..fce7d2d 100644
--- a/contrib/packages/rpm/el6/SPECS/tigervnc.spec
+++ b/contrib/packages/rpm/el6/SPECS/tigervnc.spec
@@ -342,7 +342,7 @@
 	-DJAVA_TSA_URL=http://timestamp.geotrust.com/tsa .
 %endif
 
-JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make
+make
 popd
 
 %install
diff --git a/contrib/packages/rpm/el7/SPECS/tigervnc.spec b/contrib/packages/rpm/el7/SPECS/tigervnc.spec
index 2f74fcb..d91c174 100644
--- a/contrib/packages/rpm/el7/SPECS/tigervnc.spec
+++ b/contrib/packages/rpm/el7/SPECS/tigervnc.spec
@@ -262,7 +262,7 @@
 	-DJAVA_TSA_URL=http://timestamp.geotrust.com/tsa .
 %endif
 
-JAVA_TOOL_OPTIONS="-Dfile.encoding=UTF8" make
+make
 popd
 
 %install
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 80e0dd2..7d6c70a 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -9,7 +9,7 @@
 
 set(DATA_DIR "${CMAKE_INSTALL_PREFIX}/share")
 
-set(DEFAULT_JAVACFLAGS "-source 7 -target 7 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation,-rawtypes")
+set(DEFAULT_JAVACFLAGS "-source 7 -target 7 -encoding UTF-8 -Xlint:all,-serial,-cast,-unchecked,-fallthrough,-dep-ann,-deprecation,-rawtypes")
 set(JAVACFLAGS ${DEFAULT_JAVACFLAGS} CACHE STRING
   "Java compiler flags (Default: ${DEFAULT_JAVACFLAGS})")
 message(STATUS "Java compiler flags = ${JAVACFLAGS}")