Getting below error :
Error injecting constructor, class com.aspose.psd.coreexceptions.FrameworkException: Failed to set license.
Details: String index out of range: -1
com.aspose.psd.License.setLicense(Unknown Source)
I have set the license like this →
val license = new License()
license.setLicense(“Aspose.PSD.Java.lic”)
@Lakshay_Gupta could you please provide the licenses file that is used. Please also specify the version of Aspose.PSD for Java you use.
Please also check the following article: Licensing|Documentation
Maybe using stream can work for you
com.aspose.psd.License license = new com.aspose.psd.License();
license.setLicense(new java.io.FileInputStream("Aspose.PSD.Java.lic"));
Also, please check if the paths to the license is valid.
Thank you @Dmitriy.Sorokin, the issue is resolved for me now.
1 Like