ml.francis Posted November 4, 2019 Share Posted November 4, 2019 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. Link to comment Share on other sites More sharing options...
Solution C-Box Posted November 6, 2019 Solution Share Posted November 6, 2019 What about using wildcards in your cp parameter?https://stackoverflow.com/questions/219585/including-all-the-jars-in-a-directory-within-the-java-classpathI 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-jasperreportshth + regardsC-Box Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now