在外壳脚本中将编码格式设置为Java [英] Setting Encoding format to java in shell Script

查看:39
本文介绍了在外壳脚本中将编码格式设置为Java的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行我的Java应用程序的shell脚本.现在,我想使用shell脚本为我的Java应用程序指定编码格式"UTF8"可以提供任何帮助.我使用的是Mac OS.

I have a shell script which runs My Java Application.Now i want to specify encoding format "UTF8" to my java application using shell script can any one help.I am using mac os.

谢谢
加内什

推荐答案

尝试

//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

这篇关于在外壳脚本中将编码格式设置为Java的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆