Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Thu Jan 18, 2024 2:55 am

Hello Team,

I received a temporary license and am trying to run Spire.Office for JAVA in Eclipse.

However, when importing com.spire.doc, the message The import com.spire.doc cannot be resolved appears.

The added library Spire.Office.jar does not include com.spire.doc.

I want to know the solution.

PDF, presentation, and xls seem to work properly, but this only happens with doc.

Thank you.

chulhoyoo
 
Posts: 2
Joined: Thu Jan 18, 2024 12:43 am

Thu Jan 18, 2024 3:12 am

Hello,

Thank you for your inquiry.
Based on your description, I suspect that you did not import Spire.Office through Maven. Please note that starting fromSpire.Office for Java Version: 9.1.4, the jar file for Spire.Doc is no longer included in the Spire.Office jar file. When importing Spire.Office via Maven, it automatically includes the jar file for Spire.Doc. However, if you are manually importing the jars, you will need to download Spire.Doc separately and import its jar file along with the others.
Regarding the licensing file, please refer to the code snippet below as guidance:
Code: Select all
com.spire.doc.license.LicenseProvider.setLicenseKey("OfficeLicenseKey");
com.spire.doc.license.LicenseProvider.loadLicense();
com.spire.license.LicenseProvider.setLicenseKey("OfficeLicenseKey");
com.spire.license.LicenseProvider.loadLicense();

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Thu Jan 18, 2024 4:39 am

Hello,

Thanks for your patience.
I only have a temporary license for Spire.Office now.
If I want to follow what you replied, do I also need to get a temporary license for Spire.doc?

Best regards,
Chulho

chulhoyoo
 
Posts: 2
Joined: Thu Jan 18, 2024 12:43 am

Thu Jan 18, 2024 5:34 am

Hello,

Thank you for your feedback.
We would like to clarify that there is no need to apply for a separate authorization for Spire.Doc. The licensing of Spire.Office encompasses Spire.Doc as well. Therefore, the authorization you received for Spire.Office effectively covers the usage of Spire.Doc within your project.
If you have any further questions or concerns regarding the licensing or any other matter, please do not hesitate to reach out to us.

Sincerely,
Annika
E-iceblue support team
User avatar

Annika.Zhou
 
Posts: 1657
Joined: Wed Apr 07, 2021 2:50 am

Return to Spire.Doc

cron