我有一个运行我的 Java 应用程序的 shell 脚本。现在我想使用 shell 脚本为我的 java 应用程序指定编码格式“UTF8”,任何人都可以提供帮助。我使用的是 mac os。
Thanks
Ganesh
Try
//invoking the compiler when your source code contains naked UTF-8 characters.
javac.exe -encoding UTF-8 MyClass.java
and
//setting the default encoding on the command line
java.exe "-Dfile.encoding=UTF-8" -jar myprog.jar
来源:http://mindprod.com/jgloss/encoding.html http://mindprod.com/jgloss/encoding.html
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)