ICEpdf outside the IDE

I am in the proces of developing a scientific decision support system on soil degradation and soil restoration directed against users in west Africa. As a part of this decision support system I have made it possible to view PDF-files by aid of ICEpdf, and this is functioning very well when running the program from the Netbeans IDE. However, when I make applications to be installed (by aid of IzPack) on other computers the pdf-functionality disappears. When installing the program on other computers the buttons used to display the PDF-files do not function at all, which they do when the program run from the IDE. I have taken care that the pdf-files are situated in the right directory. The same happens if I run the jar-file outside the IDE on my own computer.

I hope you have an idea as how to solve this problem.
JorgenAxAsked:
Who is Participating?
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
please look at the screen-shot of the "Project | Libraries" window.
Firstly, you may have neglected to attach the screenshot that you are referring to.

Secondly, (unless you have taken some very specific steps to do something different) simply including the libraries like above, only helps you COMPILE your application. It doesn't help you to RUN your application, or in other words you still need to provide your application jar files AND the library jar files to Java when you are running your app.

I believe the way Netbeans sets things up allows you to run your app outside of the IDE as long as the files in the "dist" folder AND the "lib" folder are present, and that the same folder structure is present. (Technically, Netbeans adds entries inside the Manifest file that is inside your jar file that refer to the location of the library jar files via relative paths, that's why the directory structure needs to remain as is)

An alternative that MAY work is if you can combine everything into ONE jar file. This isn't the default setting because there can be quite a number of issues with this, but it is something that you can try and see if it works in your case. Have a look at this link: http://www.oracle.com/technetwork/articles/javase/index-139904.html which details the process to take. While it refers to an older version of Netbeans, I believe your version still uses Ant to manage the build and so the same procedure should still apply. If you have any problems with it, let us know.
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
I would say that either the ICEpdf jar file(s) aren't being included in your distribution or that they are there but your classpath isn't set right to allow your code to find these jar file(s).

I can't really help much more without you providing some more detail on exactly how you are packaging, distributing, installing and running your program.
0
 
JorgenAxAuthor Commented:
Dear Experts

I believe I have included the right ICEpdf-libraries, but please look at the screen-shot of the "Project | Libraries" window.

The problem also occurs when I copy the compiled jar-file from "\...\dist\" to other libraries, for instance C:\

Other good ideas?  Mismatches between Java Runtime and Netbeans versions?

Best regards
Jorgen
0
Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

 
JorgenAxAuthor Commented:
Thanks a lot. I had not taken care to update the lib-folder in the folder used be the IzPack program. Updating the lib folder fixed the problem.
0
 
JorgenAxAuthor Commented:
Thanks. This solved my problem I had to update the lib file in the folder used by the IzPack program
0
 
mccarlIT Business Systems Analyst / Software DeveloperCommented:
You're welcome. I'm glad you were able to get it all working!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.