You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by Ray Clouse <cl...@simsg1.lgb.cal.boeing.com> on 2003/01/22 00:33:59 UTC
even MORE basic question to be resolved
I can't get the javac compiler to see the dom.jar or sax.jar package. I'm
using this to compile:
javac -classpath jaxm-1.1_01/jaxp-1.2_01/sax.jar tower.java
But it gives me an error with:
tower.java:14: package javax.xml does not exist
import javax.xml.*;
^
I tried the above with dom.jar also with the same result.
Where is this package and how do I get the compiler to recognize it?
I'm using Red Hat 7.3 with j2sdk-1.4.1_01-fcs & j2re-1.4.1_01-fcs installed
from RPM. Here's the kernel:
Linux simdata2 2.4.18-17.7.xsmp #1 SMP Tue Oct 8 12:37:04 EDT 2002 i686
unknown
--
------------------------------------------------------------------------
Ray Clouse
STICS Lab
ray.clouse AT boeing.com Don't fear the penguins.
clouse AT rayclouse.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
exception in JApplet w/ SAX
Posted by Ray Clouse <cl...@simsg1.lgb.cal.boeing.com>.
I found a couple of examples of the SAX parser, and I get them to work just
fine. But then when I put the appropriate code in my applet, I get this
exception:
java.lang.NoClassDefFoundError: org/apache/xerces/parsers/SAXParser
at tower$ReadWindSocket.run(tower.java:198)
at java.lang.Thread.run(Thread.java:536)
The line it's "excepting" on is the first one:
XMLReader parser = new org.apache.xerces.parsers.SAXParser();
ContentHandler handler = new MyContentHandler();
parser.setContentHandler(handler);
parser.parse(line);
This code is inside the run() of a thread (Runnable).
I have my CLASS_PATH defined correctly:
CLASSPATH=.:/usr1/people/clouse/public_html/xml/lib/xerces.jar:/usr1/people/clouse/public_html/xml/lib/rt.jar:/usr1/people/clouse/public_html/ptplot52/ptolemy/plot/plotmlapplet.jar:/usr1/people/clouse/public_html/xml/lib/rt.jar
Actually, it's a bit kludgy. There's got to be a better way than to have to
explicitly list each and every jar file I need to use.
Again, this exact same code is from a regular Java application and it
definately works. I hope someone out there has seen this before and can
help! TIA.
--
------------------------------------------------------------------------
Ray Clouse
STICS Lab
ray.clouse AT boeing.com Don't fear the penguins.
clouse AT rayclouse.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: even MORE basic question to be resolved
Posted by Simon Kitching <si...@ecnetwork.co.nz>.
Hi Ray,
Package javax.xml is part of the java 1.4 distribution, so it looks like
you have a stuffed java installation on your machine.
try
jar tf $JAVA_HOME/jre/lib/rt.jar | grep "javax.xml"
and you should see the classes.
Regards,
Simon
On Wed, 2003-01-22 at 12:33, Ray Clouse wrote:
> I can't get the javac compiler to see the dom.jar or sax.jar package. I'm
> using this to compile:
>
> javac -classpath jaxm-1.1_01/jaxp-1.2_01/sax.jar tower.java
>
> But it gives me an error with:
>
> tower.java:14: package javax.xml does not exist
> import javax.xml.*;
> ^
> I tried the above with dom.jar also with the same result.
>
> Where is this package and how do I get the compiler to recognize it?
>
> I'm using Red Hat 7.3 with j2sdk-1.4.1_01-fcs & j2re-1.4.1_01-fcs installed
> from RPM. Here's the kernel:
>
> Linux simdata2 2.4.18-17.7.xsmp #1 SMP Tue Oct 8 12:37:04 EDT 2002 i686
> unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org