java.lang.NoSuchMethodError: java.lang.String.contains


We are using Aspose.Slides for Java (version 1.8.2) and when processing a Powerpoint presentation with particular slide (not sure exactly which slide of presentation), it is throwing the following error…

java.lang.NoSuchMethodError: java.lang.String.contains(Ljava/lang/CharSequence;)
at com.aspose.slides.dJ.if(SourceFile:356)
at com.aspose.slides.Presentation.write(SourceFile:623)

we are running in WebLogic8.1 and JDK1.4.2. The Aspose.Slide for Java states it works with JDK1.4 and up…but the contains method of the String class is not supported in JDK1.4.2 (it is introduced in JDK1.5). Can you please let me know why your class is referencing contains method when it is supposed to work in JDK1.4.2? Thanks!

Sunish Abraham

Hello Sunish,

I’m not sure about 1.8.2 but try to use latest version 1.8.7.
It’s compiled using jdk 1.4.2_17 and there can’t be any unsupported methods.

i downloaded for java which includes the latest aspose.slides (v1.8.7) and it seems it is built against JDK1.6 ( file states that it was built using jdk16)…

Created-By: 1.6.0_06 (Sun Microsystems Inc.)

Caused by: java.lang.UnsupportedClassVersionError: com/aspose/slides/Slide (Unsupported major.minor version 49.0)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(
at Method)

can the Aspose.Slides JAR be updated to be built against JDK1.4? we are running into an issue with processing a slide (which seems to be calling code in Aspose.Slides which uses the contains method of String class -- which is not available in JDK1.4). thanks!


I published new Aspose.Slides for Java 1.8.8 yesterday.
It was compiled with JDK 1.4. You can download it here.

Hi Alexey,

I downloaded Aspose.Slides v1-8-8 and looked at the MANIFEST.MF file and it still states that the JAR was built against JDK1-6...

Manifest-Version: 1.0
Created-By: 1.6.0_06 (Sun Microsystems Inc.)

and we are unable to build our project with the Aspose.Slides JAR (because we are building using JDK1-4-2).


JAR and Manifest file created by Ant which is run under JDK 1.6.
All classes compiled using JDK 1.4.