The OpenDocument web site is not longer accepting new posts. Information on this page is preserved for legacy purposes only. For current information on ODF, please see the OASIS OpenDocument Technical Committee.

Follow-up ODFDOM tutorial

Sorry, newbie here trying to do tutorial mentioned at:

import statements on .jar files apparently not working...

when attempt to run from currrent directory:

%java QuickOdt

Exception in thread "main" java.lang.NoClassDefFoundError: org/odftoolkit/odfdom/doc/OdfTextDocument at QuickOdt.main( Caused by: java.lang.ClassNotFoundException: org.odftoolkit.odfdom.doc.OdfTextDocument at$ Source) at Method) at Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) ... 1 more

not sure if I missed something or if the JVM is having some issue with my system? Vista Home Premium.

renamed .jar file to .zip and the structure is fine org\odftoolkit\odfdom\doc\OdfTextDocument.class does exist ... wouldn't think front/back slash matters?

I just recompiled the QuickODT program with the latest version of odfdom.jar (2010-02-19), and it appears to work. Could this be a classpath problem? If you don't have Xerces and ODFDOM in your default classpath, you will need to specify them when you run the program as well. On my Linux machine, the command was

java -cp lib/xercesImpl.jar:lib/odfdom.jar:. QuickOdt


Hi Jaocon,

you are right, the tutorials are not reflecting the latest API changes, as the ODFDOM team member with the focus on tutorials is currently distracted by his main profession.

Therefore until we have closed the gap, please take a look at the descriptions referenced from our project home page:

Thanks for bringing this up,
Svante Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I