我写了一个简单的套接字程序并在linux终端中执行,同时编译我没有遇到任何错误,但在运行时给出了以下错误..
/root/Desktop/httpcore.jar: line 1: PK: command not found
/root/Desktop/httpcore.jar: line 2: 6��:: command not found
/root/Desktop/httpcore.jar: line 22: Ġ�:org/PK: No such file or directory
/root/Desktop/httpcore.jar: line 23: Ġ�:
org/apache/PK: No such file or directory
/root/Desktop/httpcore.jar: line 24: Ǡ�:org/apache/http/PK: No such file or directory
/root/Desktop/httpcore.jar: line 25: Ǡ�:org/apache/http/protocol/PK: No such file or directory
/root/Desktop/httpcore.jar: line 26: Ǡ�:org/apache/http/io/PK: No such file or directory
/root/Desktop/httpcore.jar: line 27: Ǡ�:org/apache/http/message/PK: No such file or directory
/root/Desktop/httpcore.jar: line 28: Ǡ�:org/apache/http/entity/PK: No such file or directory
/root/Desktop/httpcore.jar: line 29: Ǡ�:org/apache/http/util/PK: No such file or directory
/root/Desktop/httpcore.jar: line 30: Ǡ�:org/apache/http/params/PK: No such file or directory
/root/Desktop/httpcore.jar: line 31: Ǡ�:org/apache/http/impl/PK: No such file or directory
/root/Desktop/httpcore.jar: line 32: Ǡ�:org/apache/http/impl/io/PK: No such file or directory
/root/Desktop/httpcore.jar: line 33: Ǡ�:org/apache/http/impl/entity/PK: No such file or directory
/root/Desktop/httpcore.jar: command substitution: line 34: unexpected EOF while looking for matching `''
/root/Desktop/httpcore.jar: command substitution: line 38: syntax error: unexpected end of file
/root/Desktop/httpcore.jar: command substitution: line 21: syntax error near unexpected token `)'
/root/Desktop/httpcore.jar: command substitution: line 21: `�R�+'�3=��6�L\�Z���]�^���&�Q�y|x���[�<�'��$�ְ[ ��GZoU�����kM��[���p4IY�������3�ht�qw��3����r�!8����#A^
?P����v��;��Q|�l��p����cl(?jkZ���� Q�9|R���o��R�yH\1=��qtLH�^cBR�s
�g��'��
N����P�n�*-�p��c4�� (��KҘ#-����1b����ZY�<H��M�?å���>�dą�n'
/root/Desktop/httpcore.jar: line 21:5��:~��ЁMETA-INF/MANIFEST.MF�O�j�0���: No such file or directory
/root/Desktop/httpcore.jar: line 22: syntax error near unexpected token `newline'
/root/Desktop/httpcore.jar: line 22: `~J�"K�Q���M�m7n;<x�A�E��z>h#��Z�L���j�De��}���5��i��e�^���f^�˰H5���腍l(�uD>��[_`�FW�Ph���d!����R�+��K:"�7@)AZV�"r7���5wTXBJ��� v?V>f+�k�F/2�DAfm�p�rtT�iǖ���ȏ�x�4��`��YC<�Q\��ь����B�M�(P.���#��PD�a�F"��l��"����4�u<v���R�܀�Ѧb�l�PFEHJ���$t�����mK��r��7K?�����H�p۷���Y��������f&K��TI�H ������9�S��Ֆ ���T{�\�3�K����Ǘ�z�'s�+B����@��\j}��E�4?b1���ϔs�v�3�J���\�2�`�r
�"���K��Y3�]a;������u�<��j~�Q��1<Q���`&�
M�>'
答案 0 :(得分:0)
您可能想要检查用于编写和保存源代码的文本编码,然后在编译程序时可以指定正确的编码样式,例如:添加-encoding UTF-8
(根据您的编码类型)。
参考: http://docs.oracle.com/javase/7/docs/technotes/tools/windows/javac.html