OC4J Aspose License文件加载

时间:2017-10-26 06:27:23

标签: java oc4j aspose.words

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

配置:

  1. JDK 1.5.06
  2. OC4J Standalone 10.1.3
  3. Aspose.Words.jdk14.jar

1 个答案:

答案 0 :(得分:0)

您似乎使用的是相当旧版本的Aspose.Words for Java。请下载并试用Aspose.Words for Java的最新版本。它将解决问题。

我是Tilal,Aspose的开发人员传播者。