PDA

View Full Version : Java: add java.xml lib to Eclipse?



andrew222
January 11th, 2009, 07:11 PM
Hello,

I was just trying to run a program from the Cay Hortsmann book 'Big Java' which is an XML parser. I was getting an error message telling me that importing from java.xml.*; can not be resolved. Is there a way I can add this library so i can use it with any IDE and with command line compilations?

Also, I need to do an 'import org.*; as well, any help is welcome!

Rgds,

Andrew

kavon89
January 11th, 2009, 10:28 PM
Check if there is a CD that came with the book, containing examples and more importantly the libraries.

Also, execute " java -version " in your operating system's command line. Java 6 should come with xml libraries.


import javax.xml.*;

andrew222
January 11th, 2009, 10:57 PM
Yes, after double checking the code it should be 'javax.xml.*'. I got too ahead of myself, i'll check you a thanks and call this thread as solved...

drubin
January 14th, 2009, 02:55 AM
Yes, after double checking the code it should be 'javax.xml.*'. I got too ahead of myself, i'll check you a thanks and call this thread as solved...

In general if your thread is solved you should use the thread tools right above your first post of the thread. see https://wiki.ubuntu.com/UnansweredPostsTeam/SolvedThreads

Glad things worked out in the end.

EDIT:
Thanks solved feature was still enabled when I posted this. (not sure if it will be back or not) see this (http://ubuntuforums.org/showpost.php?p=6544653&postcount=9)

jespdj
January 14th, 2009, 09:44 AM
and call this thread as solved...
You can set your own thread to "SOLVED" using the Thread Tools menu in the top right of the page.

*edit*: too late... :)

drubin
January 14th, 2009, 09:46 AM
You can set your own thread to "SOLVED" using the Thread Tools menu in the top right of the page.

*edit*: too late... :)

hehehe :)