We are using aspose-words-java-for-ruby and we recently updated the version of the .jar file from 17.7-jdk-16 to 19.11-jdk-17 which seems to break Java functionality on Mac.
Whenever Aspose is initialized, it’s triggering a pop-up saying “to run this Java application, you must install the legacy Java SE 6 Runtime”. That particular version of Java is outdated and MacOS will not let you install it. We spent a day or two looking for workarounds to no avail.
Strangely, it seems to completely remove Aspose’s .replace method which is what we use to actually replace all the document variables in the feature that’s dependent on Aspose. That method is still listed in the documentation so we’re not sure why this happens.
We suggest you please use the latest version of Aspose.Words for Java 20.2 and upgrade your Java version. We removed the obsolete Replace methods from Range class. Please read the following article and update your code according to latest APIs. Find and Replace
Thanks for the suggestion - we have upgraded to the latest version of Aspose Words for Java 20.2 and tried jdk-16 and jdk-17 but we are still getting the prompt for installing JAVA SE6 runtime environment and also getting error with the .replace method. We are working on MacOS Catalina 10.15.3.
We are using asposewordsforjavaruby and we followed the documentation for ruby - Find And Replace in Ruby|Aspose.Words for Java which has last been updated in May 2016. Do we need to change anything with how we are using the .replace method in ruby? Since you said the .replace method has become obsolete, what should we use instead?
Reason for this prompt was -
“By default JDK from oracle only enabled the CommandLine capability but this library (Rjb) needed JNI and possibly more capabilities because of which macOs was suggesting me to install the old version of the Java from Apple which had those capabilities enabled by default.”