Free Support Forum -

Cannot save to HTML


I cannot save a document to HTML using Aspose.Words JAVA

Here is the very simple code I use :

public static void main(String[] args) throws Exception {
License lic = new License();
Document doc = new Document(“Docs\test.doc”);“Docs\OUTPUT_ASPOSE.html”, SaveFormat.HTML);

And the exception I got :

Exception in thread “main” java.lang.NoClassDefFoundError: javax/xml/stream/XMLOutputFactory
at com.aspose.words.internal.dv.(Unknown Source)
at Source)
at com.aspose.words.dh.(Unknown Source)
at com.aspose.words.ei.b(Unknown Source)
at com.aspose.words.Document.a(Unknown Source)
at Source)
at MainXHTMLGenerator.main(

I also attached a document I cannot save to this format.

Thank you.


Thanks for your request. It seems that you missed to add references to jsr173_1.0_api.jar and sjsxp.jar.

Best regards.