Sanjay Bhatia wrote:

> Hi,
>         I've read every doc I could find and cannot solve a particular problem I am
> having with running an example on my linux machine.  Details are :
>
> My CLASSPATH environment variable is set as follows :
>
> /usr/local/xerces/xerces.jar:/usr/local/xerces/xercesSamples.java:

Is that really a .java at the end, or do you mean .jar?

Also, you probably need to export your classpath. You can do this after you set it:

    export CLASSPATH

If you don't do this, your shell knows about CLASSPATH, but subprocesses (like java)
do not.

Nathan Meyers
[EMAIL PROTECTED]

>
>
> Both the files exist on disk.
>
> when I run the following command :
>
> (uriah-girls)/usr/local/xerces# java -cp
> /usr/local/xerces/xerces.jar:/usr/local/xerces/xercesSamples.jar  sax.SAXCount
> data/personal.xml
> data/personal.xml: 2557 ms (37 elems, 18 attrs, 140 spaces, 128 chars)
>
> I get the correct output.
>
> But when I run :
> (uriah-girls)/usr/local/xerces# java  sax.SAXCount data/personal.xml
> Exception in thread "main" java.lang.NoClassDefFoundError: sax/SAXCount
>
> I get an Exception.  So, the CLASSPATH is not being read from the environment
> as I would expect.  The docs. for my example say that I should be able to set a
> CLASSPATH environment variable and it will work.  Not in this case.
>
> Can someone help me with this please?
>
> Thanks,
> sb
>
> __________________________________________________
> Do You Yahoo!?
> Get email at your own domain with Yahoo! Mail.
> http://personal.mail.yahoo.com/
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]


----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to