FileNotFoundException while echoing an xml file with SAX Parser

In theWorking with XML tutorial in part 2 there is an exemple of echoing an xml file with SAX Parser. TheslideSample01.xml file and theEcho.java file are from the tutorial and I have the both files in the same directory (c:/java). When I compilejavac. 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?

[1704 byte] By [rovalaasa] at [2007-10-3 4:07:58]
# 1
"The system cannot find the file specified"... this seems pretty clear to me. What don't you understand about it?
DrClapa at 2007-7-14 22:07:43 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

That's exactly what I don't understand. Why "The system cannot find the specified file" (slideSample.xml) if both the Echo.java file and the slideSample.xml file are in the same directory? I have just followed the instructions from the tutorial:

1. javac Echo.java

2. java Echo slideSample.xml

What should I do in order for the system to find the slideSample.xml file? Sorry for my ignorance.

rovalaasa at 2007-7-14 22:07:43 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

Resolved finally. It seems that the xml file was wrong written. In the example there are two links for the simpleSlide01.xml file. The first link is with .xml extension and the second link is with html extension. I had copied the one with the .xml extension and for some reason that I don't understand yet that was wrong. When I copied the content of the one with the .html extension into a Notepad file and saved it with .xml extension it worked with no problem.

rovalaasa at 2007-7-14 22:07:43 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...