JAVA 開發常見錯誤(持續更新)

來源:互聯網
上載者:User

1)接收檔案時出現如下錯誤:

java.io.UTFDataFormatException: malformed input around byte 19

at java.io.DataInputStream.readUTF(DataInputStream.java:617)
at java.io.DataInputStream.readUTF(DataInputStream.java:547)
at cn.ac.ict.AcceptFileFromPC.run(AcceptFileFromPC.java:49)
at cn.ac.ict.SocketManager.doFlag(SocketManager.java:127)
at cn.ac.ict.SocketManager.run(SocketManager.java:89)

解決方案:DataInputStream流在前面已經開啟過,然後在後面又從socket中擷取這個流,此時出現流異常(可能DataInputStream流不完整)。所以只要僅在一 處開啟socket的輸入資料流,可解決該問題。

2)[2013-04-10 20:55:33 - PictureShare_Txt] Project has no default.properties file! Edit the
project properties to set one.

1、到其他工程裡把default.properties檔案拷貝過來直接用,如果還是錯誤,把工程重新匯入一下。2、把工程中的project.properties檔案重新命名成default.properties


3)Description
Resource Path Location Type error: Apostrophe not preceded by \ (in Search' Titles) strings.xml

將定義的字串中的單引號('),修改為(\')

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.