Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to set classpath for JDOM

 
prabhu palanisamy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all,
i have loaded JDOM.what is the classpath that should i set?
or should i use that build.bat file.
help me.
thanx in advance
 
Sameer Rao
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Prabhu,
JDOM comes with a jdom.jar and xerces.jar files. Those are all you need to use if for parsing xml documents. If you have the source code and want to use the Build.bat/sh file to build the binaries again, its still ok. If you build the binaries, then it is better to have the new jdom1-b-4.jar (something by similar name) and the xerces.jar files in the CLASSPATH and remove any other xerces.jar or jdom.jar from the CLASSPATH.
Also, some books have the following code:
org.jdom.inpout. Builder builder = new
org.jdom.input.DOMBuilder();
Document doc = builder.build(new File(args[0]));
Now if you unarcheive the jdom.jar or look in the source files
under org/jdom/input fodler there's no Builder.java nor does
the declaration of DOMBuilder says that it extends Builder.
Hence it might be good to use DOMBiulder builder = new
DOMBuilder().
These are a couple of things that I experienced with Jdom.
Do share ur exp.
Hope this helps...



------------------
_SvR_
 
prabhu palanisamy
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi sameer,
thanx for ur response,i cleared my problem,the problem was having one more xerces.jar.now its fine.
i'll surely share my experience
cheers,
prabhu.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic