C:\Majid\Javapractices\STAX\de\vogella\xml\stax\model
that has :
Item.java
and
C:\Majid\Javapractices\STAX\de\vogella\xml\stax\read
that has :
StaXParser.java
TestRead.java
when I do :
C:\Majid\Javapractices\STAX\de\vogella\xml\stax\read>javac TestRead.java
TestRead.java:5: package de.vogella.xml.stax.model does not exist
import de.vogella.xml.stax.model.Item;
^
TestRead.java:9: cannot find symbol
symbol : class StaXParser
location: class de.vogella.xml.stax.read.TestRead
StaXParser read = new StaXParser();
^
TestRead.java:9: cannot find symbol
symbol : class StaXParser
location: class de.vogella.xml.stax.read.TestRead
StaXParser read = new StaXParser();
^
TestRead.java:10: cannot find symbol
symbol : class Item
location: class de.vogella.xml.stax.read.TestRead
List<Item> readConfig = read.readConfig("config.xml");
^
TestRead.java:11: cannot find symbol
symbol : class Item
location: class de.vogella.xml.stax.read.TestRead
for (Item item : readConfig) {
^
5 errors
C:\Majid\Javapractices\STAX\de\vogella\xml\stax>javac -cp . de\vogella\xml\stax\
read\TestRead.java
javac: file not found: de\vogella\xml\stax\read\TestRead.java
Usage: javac <options> <source files>
use -help for a list of possible options
Please read the commands and error messages and try to understand what the command is going to do, or what the error message means.
You are in the directory C:\Majid\Javapractices\STAX\de\vogella\xml\stax and then you try to compile the file de\vogella\xml\stax\read\TestRead.java
It is ofcouse going to look for a file named C:\Majid\Javapractices\STAX\de\vogella\xml\stax\de\vogella\xml\stax\read\TestRead.java
(note the directory names).
Make sure you are in the directory C:\Majid\Javapractices\STAX and not C:\Majid\Javapractices\STAX\de\vogella\xml\stax