Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Tue May 03, 2022 1:46 am

Hi, I am making a Javafx app that uses Spire.Pdf to convert pdf to svg.
The code works fine when running on my IDE but throws this error.

Code: Select all
java.lang.NoClassDefFoundError: com/spire/pdf/packages/spruHc


the package itself changes every time I create an installer for the application.
I am using Jpackage and gradle to create msi installer for my project.
I will also attach a sample project for better investigation.
I also tried different free versions of spire.pdf but still no luck.
currently using the latest free version.

Thanks for your help.

johnebarita
 
Posts: 5
Joined: Fri Mar 18, 2022 1:02 pm

Tue May 03, 2022 1:53 am

There was some issue uploading the sample project so I uploaded it on google drive.
here is the link.
Thanks

https://drive.google.com/file/d/135NbT3iKc5ENxd6xighCNH3zsbmchaCa/view?usp=sharing

johnebarita
 
Posts: 5
Joined: Fri Mar 18, 2022 1:02 pm

Tue May 03, 2022 3:05 am

Hi,
I think the problem maybe with the spire being obsfcated and having the same class name but in
different uppercase and lowercase.
When running Jpackage it calls a function mergeModule which creates a merged jar file of all the
dependencies. mergeModule unpacks the different jar and merge it into 1 jar thus removing duplicates.
I might be wrong.
Looking forward to hearing from you.

johnebarita
 
Posts: 5
Joined: Fri Mar 18, 2022 1:02 pm

Tue May 03, 2022 6:58 am

Hello,

Thank you for your inquiry.
For your situation, I suggest that you use our commercial version (the latest version is Spire.PDF for Java Version:5.4.2), which contains more fixes and new features than the free version. We are willing to provide you with a one-month temporary license to evaluate without any watermarks and restrictions, please apply for a temporary license from this link: https://www.e-iceblue.com/TemLicense.html.

Sincerely,
Annika
E-iceblue support team
User avatar

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

Return to Spire.PDF