package does not exist

Hi experts,

I have two java files in C:\raj\Java-Tutorial\Java-Practice\

XMLvalues.java & sax.java

1) In XMLvalues.java .. i have "package samparsing;" declared as package name

2) I am importing this in sax.java as "import samparsing.*;" on the first line of this file.

3) I compiled XMLvalues.java to create a class file.. no compilation error

4) Now compiling sax.java and getting the following error

C:\raj\Java-Tutorial\Java-Practice>javac sax.java

sax.java:1: package samparsing does not exist

import samparsing.*;

my class path is like this

set CLASSPATH=%CLASSPATH%;C:\raj\Java-Tutorial\Java-Practice

Why I am getting this error and what is the problem ? I could not figure out.

Thanks,

-Raj..

[801 byte] By [rajrajma] at [2007-10-2 10:59:08]
# 1

It could be said that class a.b.C and a.b.D are in package a.b

If that is your desire, then C.java and D.java would be located under directory ...\a\b

If your java packages are all in C:\java you would have a file C:\java\a\b\C.java and a file C:\java\a\b\D.java

Those two files would both proclaim they are in package a.b, as in:package a.b;

Your classpath would include C:\java

Laszlo.a at 2007-7-13 3:27:22 > top of Java-index,Java Essentials,Java Programming...
# 2
Thanks will try this
rajrajma at 2007-7-13 3:27:22 > top of Java-index,Java Essentials,Java Programming...