Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 SAX Parser 但调试后错误显示在这一行
saxParser.parse("C:\\Sample.XML", handler);
错误是:- java.io.FileNotFoundException: C:\Sample.XML(系统找不到指定的文件)
java.io.FileNotFoundException
反斜杠“\”是 java 字符串中的转义字符。
您需要双重转义反斜杠“\\”。
如有疑问,请咨询Oracle