Hi, I was just hoping to ask if how to set the libraries (.jar files) of Jasper Reports into my Java swing app. I use the command prompt instead of an IDE so I would manually set the classpath on each enter of the java command.
ex: java -classpath ".;mysql-connector-java-8.0.15.jar" start (this is my java file).
so how do I set the libraries for Jasper Report, I've heard there's several, that means I'll have to input it in the quotation marks and then seperate them with a semicolon? sorry I've never had to put in more than one library so I do not know. And do I also set the class path when I run the javac command for compiling also? What .jar files would I need to open a pdf file of a Jasper Report using Java swing? Thanks in advance for the help.
1 Answer:
What about using wildcards in your cp parameter?
I would put all needed jasper and external library jars into one subfolder "lib" and just use the wildcard syntax to include them.
Which jars really needed depends on what you are doing... if you want to export to excel you would need apache-poi libs as well... if you want to export to pdf you will need itext... so it isn't really defined ... a minimal set of libs are listed here for example: https://stackoverflow.com/questions/25069522/jars-needed-for-jasperreports
hth + regards
C-Box