【问题标题】:Setting Encoding format to java in shell Script在 shell 脚本中将编码格式设置为 java
【发布时间】:2011-05-24 11:51:20
【问题描述】:

我有一个运行我的 Java 应用程序的 shell 脚本。现在我想使用 shell 脚本为我的 Java 应用程序指定编码格式“UTF8”,任何人都可以帮忙。我正在使用 mac os。

谢谢
象头神

【问题讨论】:

  • “为我的 java 应用程序指定编码格式“UTF8”是什么意思?

标签: java linux shell


【解决方案1】:

试试

//invoking the compiler when your source code contains naked UTF-8 characters.
javac.exe -encoding UTF-8  MyClass.java

//setting the default encoding on the command line
java.exe "-Dfile.encoding=UTF-8" -jar myprog.jar

来源:http://mindprod.com/jgloss/encoding.html

【讨论】:

    猜你喜欢
    • 2010-11-11
    • 2014-07-13
    • 1970-01-01
    • 1970-01-01
    • 2017-07-05
    • 2012-08-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多