Created
August 25, 2015 08:08
-
-
Save BioQwer/e8cb90ab7faa3b6f7562 to your computer and use it in GitHub Desktop.
Provide UTF-8 encoding without -D on start JVM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
try { | |
System.setProperty("file.encoding", "UTF-8"); | |
Field charset = Charset.class.getDeclaredField("defaultCharset"); | |
charset.setAccessible(true); | |
charset.set(null, null); | |
} catch (IllegalAccessException | NoSuchFieldException e) { | |
e.getMessage(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment