Error trying to create a Portion within a Paragraph

Sample Code :

IPortion p = new Portion();
p.setText(“Hello Aloha!”);
p.getPortionFormat().setFontHeight(10);

Version - 17.10

Error :
java.lang.ExceptionInInitializerError
at com.aspose.slides.nb.(Unknown Source)
at com.aspose.slides.nd.(Unknown Source)
at com.aspose.slides.ax.(Unknown Source)
at com.aspose.slides.y4.(Unknown Source)
at com.aspose.slides.y4.(Unknown Source)
at com.aspose.slides.BasePortionFormat.setFontHeight(Unknown Source)

Version - 18.6
Error :
java.lang.NoClassDefFoundError: Could not initialize class com.aspose.slides.z8
at com.aspose.slides.BasePortionFormat.setFontHeight(Unknown Source)

@kaushikranjan

This forum is for topics related to Aspose REST APIs whereas your query is relevant to Aspose Native/Downloadable APIs. Please follow this thread Error trying to create a Portion within a Paragraph - Free Support Forum - aspose.com for an answer to your query.