import javax.xml.stream doesn't exist - please help

L

learner9

Hello,
I am working on a java program and it needs the the above said to be
imported. But for some reason I am getting the javax.xml.stread doesn't
exist!

I am a beginer and not sure why its comaplaining about this. Is there
any thing I need to download inorder to import the javax.xml.stream
package?


Please help,
-Thanks
-L
 
J

Jean-Francois Briere

Which class are you using from this so-called javax.xml.stream package?
Because if it's StreamSource or StreamResult, they belong to package
javax.xml.transform.stream.

Regards
 
A

Alan Krueger

Roedy said:
javax.xml.* started being bundlde with JDK 1.5. Are you using an old
JDK?

If so, get a new one. See http://mindprod.com/jgloss/jdk.html

Not everyone is free to do this. The product made in the division I
work for currently targets 1.4.2 since our custom base is still mainly
J2EE servers running on pre-1.5 VMs. Some of our customers are having
to be forced to install something beyond 1.3.
 
L

learner9

Hello,
I just have downloaded the jwsdp from the url you mentioned and here
is my path when I typed in cmd window

C:\Documents and Settings\Administrator>path
PATH=C:\texmf\miktex\bin;C:\MiKTeX\texmf\miktex\bin;C:\Program
Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\
Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;C:\Program
Files\Common Files\Roxio Shared\DLLShared;D:\j2sdk1.4.2_04\bin
;C:\Program
Files\Perl\site\lib;C:\MiKTeX\texmf\miktex\bin;C:\texmf\miktex\bin;C:\Sun\j­wsdp-2.0\jwsdp-shared\bin;C:\Sun\jwsdp-2.0\

jwsdp-shared\bin;C:\texmf\miktex\bin;C:\MiKTeX\texmf\miktex\bin;C:\Program

Files\Perl\bin\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDO
WS\System32\Wbem;C:\Program Files\Microsoft SQL
Server\80\Tools\BINN;C:\Program Files\Common Files\Roxio
Shared\DLLShared;D:\j2sdk
1.4.2_04\bin;C:\Program
Files\Perl\site\lib;C:\MiKTeX\texmf\miktex\bin;C:\texmf\miktex\bin;C:\Sun\j­wsdp-2.0\jwsdp-shared\bin;C:\PR

OGRA~1\COMMON~1\MUVEET~1\030625


in which


D:\j2sdk1.4.2_04\bin; is the java path
and
C:\Sun\jwsdp-2.0\jwsdp-shared\bin; java web services path


but I still get the same error saying that javax.xml.stream doesn't
exist.


I am missing some thing here?


Thanks
-L
 
S

Steve W. Jackson

Roedy Green said:
javax.xml.* started being bundlde with JDK 1.5. Are you using an old
JDK?

If so, get a new one. See http://mindprod.com/jgloss/jdk.html

I'm afraid that's not true. The javax.xml package hierarchy appears in
1.4.2.

But the OP's question has already been asked and answered elsewhere.
The specific javax.xml.stream package he's asking about is included in
J2EE 5.

= Steve =
 
L

learner9

Hello,
I did add the path to the class path as below

set classpath=C:\Sun\j­­wsdp-2.0\jwsdp-shared\bin


But it still complains about the complains about the
EUtilParseExample.java:2: package javax.xml.stream.events does not
exist
import javax.xml.stream.events.* ;


Have I done some thing wrong in setting up the class path?


Thanks
-L
^
 
S

Steve W. Jackson

learner9 said:
Hello,
I did add the path to the class path as below

set classpath=C:\Sun\j­­wsdp-2.0\jwsdp-shared\bin


But it still complains about the complains about the
EUtilParseExample.java:2: package javax.xml.stream.events does not
exist
import javax.xml.stream.events.* ;


Have I done some thing wrong in setting up the class path?


Thanks
-L
^

Sun recommends against setting the CLASSPATH variable in favor of using
the appropriate switches. Even so, that path is the execution search
path ("bin" is a common name for directories where executable binary
files are stored). I think if you take a look at what's in there,
you'll find that there are very few jar files present and that the one
you seek isn't included. Not having a J2EE 5 installation, or the JWSDP
2.0, I can't say for sure what jar it's in or the directory.

= Steve =
 
L

learner9

I added the location of all the jar files. But still the same
errors!!!!

Thanks,
L
 
S

Steve W. Jackson

learner9 said:
I added the location of all the jar files. But still the same
errors!!!!

Thanks,
L

What does that mean, "added the location"? When you compile or run, you
need to refer to each individual jar file individually, not to the
locations where they reside. With the exception, that is, of things
added using the extensions or endorsed mechanisms. So if you've
correctly referred to all the jar files, and not their locations, then
you don't have the right jar files.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,265
Messages
2,571,069
Members
48,771
Latest member
ElysaD

Latest Threads

Top