java执行jar出现编码问题的解决方案,Could not decode a text frame as UTF-8
2017-07-28 15:08
555 查看
这阵子实现了一个C/S的可执行通讯项目的jar,然后使用webSocket通讯的时候,发现出现了编码问题,
报错如: Could not decode a text frame as UTF-8
后面查资料发现,原来直接运行jar,这个问题,
不能直接写java -jar 包.jar运行
解决方法
写成这样:java -Dfile.encoding=utf-8 -jar 包.jar
希望可以帮到你
相关文章推荐
- 理解websocket协议解决消息发送问题 Could not decode a text frame as UTF-8.
- Could not decode a text frame as UTF-8 的解决
- 可执行jar包的处理,以及could not find the main class win7/xp 双击执行jar包出现:could not find the main class的问题处理
- sqlite编码问题 OperationalError: Could not decode to UTF-8 column 'name' with
- java程序运行时出现问题:Could not find the main class: test_jena. Program will exit.
- exe4j打包jar文件为exe文件出现的问题:The JAVA_HOME environment variable does not point to a working 32-bit JDK or JRE.
- could not find the main class win7/xp 双击执行jar包出现:could not find the main class
- win7/xp 双击执行jar包出现:could not find the main class
- exe4j打包jar文件为exe文件出现的问题:The JAVA_HOME environment variable does not point to a working 32-bit JDK or
- exe4j打包jar文件为exe文件出现的问题:The JAVA_HOME environment variable does not point to a working 32-bit JDK or
- 不同编码页面之间用form传值出现乱码问题解决方案 utf-8 到 gb2312
- 关于Sqlite3报错:Could not decode to UTF-8 column 'Name' with text...
- linux下打包出现brut.common.BrutException: could not exec command: [/tmp/brut_util_Jar_22418586694498,解决方案
- could not find the main class win7/xp 双击执行jar包出现:could not find the main class
- Qt新手问题 Error:Could not decode "xxx.cpp" with "System"-encoding.Editing not possible. 最终解决方案
- JMeter命令行执行及问题解决 Error in NonGUIDriver java.lang.RuntimeException: Could not find the TestPlan class!
- java -jar xxx.jar命令执行jar包时出现Error: Invalid or corrupt jarfile xxx.jar解决方案
- Myeclipse中Struts2运行问题:Could not create JarEntryRevision for [jar:file:/E:/Java/Tomcat%206.0/webapps/Struts2.1/WEB-INF/lib/struts
- windows 双击执行jar包出现:could not find the main class
- DT升级中出现的问题的解决方案(Android upgrade ADT 22, R.java files not generated,java.lang.ClassNotFoundException)