Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within XML
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Tim Cooke
paul wheaton
Liutauras Vilda
Ron McLeod
Sheriffs:
Jeanne Boyarsky
Devaka Cooray
Paul Clapham
Saloon Keepers:
Scott Selikoff
Tim Holloway
Piet Souris
Mikalai Zaikin
Frits Walraven
Bartenders:
Stephan van Hulst
Carey Brown
Forum:
XML and Related Technologies
package org.jdom does not exist
Maha Hassan
Ranch Hand
Posts: 133
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Dear All,
I have troubles installing jdom. I followed the steps
here
but still i get errors..
I am trying to run the following example
import org.jdom.*; public class example1 { public static void main(String[] args) { Element root = new Element("myRootElement"); Document doc = new Document(root); root.setText("This is a root element"); System.out.println(doc); } }
and i get the following errors
--------------------Configuration: <Default>-------------------- Z:\Java Files\example1.java:1: package org.jdom does not exist import org.jdom.*; ^ Z:\Java Files\example1.java:7: cannot find symbol symbol : class Element location: class example1 Element root = new Element("myRootElement"); ^ Z:\Java Files\example1.java:7: cannot find symbol symbol : class Element location: class example1 Element root = new Element("myRootElement"); ^ Z:\Java Files\example1.java:8: cannot find symbol symbol : class Document location: class example1 Document doc = new Document(root); ^ Z:\Java Files\example1.java:8: cannot find symbol symbol : class Document location: class example1 Document doc = new Document(root); ^ 5 errors Process completed.
Please help me.
Maha
Ulf Dittmer
Rancher
Posts: 43081
77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Is the JDOM package in your classpath when you compile this?
Maha Hassan
Ranch Hand
Posts: 133
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
yes ,
my class path is C:\Program Files\Java\jdom-1.0\build\jdom.jar
is that correct ?
Maha Hassan
Ranch Hand
Posts: 133
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
How do i make the jdom work .. i am lost and i can not write a single example..
Ulf Dittmer
Rancher
Posts: 43081
77
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What happens if you type
javac -classpath "C:\Program Files\Java\jdom-1.0\build\jdom.jar" example1.java
and then
java
-classpath ".;C:\Program Files\Java\jdom-1.0\build\jdom.jar" example1
?
Maha Hassan
Ranch Hand
Posts: 133
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Yes it worked this way..thanks
the problem was that i never compiled using the -classpath
thanks
can jdom read dtd ..like tell me what is the root and the datatype of the elements (pcdata) or what??
If you live in a cold climate and on the grid, incandescent light can use less energy than LED. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Exception in displaying data in a pdf format
package org.apache.struts.action does not exists
JDOM -- creating XML..
noob cp problems in webapp
How to Deploy servlet using Tomcat 5
More...