Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

FileNotFoundException while echoing an xml file with SAX Parser

807569Sep 2 2006 — edited Sep 3 2006
In the Working with XML tutorial in part 2 there is an exemple of echoing an xml file with SAX Parser. The slideSample01.xml file and the Echo.java file are from the tutorial and I have the both files in the same directory (c:/java). When I compile javac. Echo, there is no problem but when I try to run the programm with
java Echo slideSample01.xml I get:

java.io.FileNotFoundException: C:\java\slideSample.xml (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at Echo.main(Echo.java:28)

Does anybody know what's wrong?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 1 2006
Added on Sep 2 2006
2 comments
206 views