I have a simple jar that uses Aspose.PDF to extract text from PDFs. It works when run from the command line but it appears to get hung on setLicense
when called via pyjnius
. This works all works just fine on Ubuntu 18.04, however on 20.04, the only way to run the jar without getting hung up at setLicense
is to run from the command line. It’s strange, and I can’t explain it.
public License SetLicense() throws Exception {
Logger logger = GetLogger();
logger.info("SetLicense Initialized");
License license = new License();
logger.info("Setting License");
logger.info(System.getProperty("user.name"));
try {
InputStream inputStream = getClass().getResourceAsStream("/Aspose.Pdf.lic");
if (inputStream.toString() == null) {
logger.info("Input stream is NULL!");
} else {
logger.info(inputStream.toString());
}
license.setLicense(inputStream);
inputStream.close();
} catch (Exception e) {
logger.info(e.getMessage());
}
return license;
}
When run via java -jar /path/to/jar
this completes and all of the logging output can be seen, but when run via pyjnius
the last item to appear in the log is this logger.info(System.getProperty("user.name"));
part. Again, this works on Ubuntu 18.04, but not 20.04.
Thank you for your assistance.