import com.aspose.words.License;
public void loadLicense() throws LicenseNotFoundException {
File licenseFile = new File("c:\Aspose.Total.Java.lic");
if (licenseFile.exists()) {
try {
License license = new License();
InputStream in = new FileInputStream(licenseFile);
license.setLicense(in);
in.close();
} catch (Exception e) {
e.printStackTrace();
throw new LicenseNotFoundException(licenseFile.getAbsolutePath() + " not loaded. " + e.getMessage());
}
} else {
throw new LicenseNotFoundException(licenseFile.getAbsolutePath() + " cannot be found.");
}
}
例外:
java.io.FileNotFoundException:!文件中找不到META-INF / MANIFEST.MF:c / oc4j_101350 / j2ee / home / applications / xxx / lib / Aspose.Words.jdk14.jar
!文件中找不到META-INF / MANIFEST.MF:C / oc4j_101350 / j2ee / home / applications / xx / lib / Aspose.Words.jdk14.jar
配置:
答案 0 :(得分:0)
您似乎使用的是相当旧版本的Aspose.Words for Java。请下载并试用Aspose.Words for Java的最新版本。它将解决问题。
我是Tilal,Aspose的开发人员传播者。