I m new in hwpf and i want to read a word document for this i am using POI
APIs HWPF
my code is this
HWPFDocument doc = new HWPFDocument (new FileInputStream (args[0]));
Range r = doc.getRange();
System.out.println("Example you supplied:");
System.out.println("-------------- -------");
for (int x = 0; x < r.numSections(); x++)
{
Section s = r.getSection(x);
for (int y = 0; y < s.numParagraphs(); y++)
{
Paragraph p = s.getParagraph(y);
for (int z = 0; z < p.numCharacterRuns(); z++)
{
CharacterRun run = p.getCharacterRun(z);
String text = run.text();
System.out.print(text);
}
System.out.println();
}
}
but this code gives an error at run time
java.lang.NoClassDefFoundError: org/apache/poi/hpsf/WritingNotSupp
ortedException
plz help me to remove this problem
i had import all HWPF APIs
--
View this message in context:
http://www.nabble.com/Error-in-HWPF-tp15871377p15871377.html
Sent from the POI - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]