Deploying Application Using JFreeChart Library
Hi all,
I'm fairly new to concepts of Java Libraries, so forgive me if this is obvious.
I'm developing an application to be distributed to users as a .jar file and would like to use JFreeChart as part the development. Will users need to download/install/configure the JFreeChart library in order to use my .jar? I'd really like to leverage this tool, and would very much like to avoid coding all my charts in swing. Any constructive input is highly appreciated. Thanks!
Re: Deploying Application Using JFreeChart Library
Re: Deploying Application Using JFreeChart Library
Re: Deploying Application Using JFreeChart Library
Thank you, shall. I found post #16 informative per link: Eclipse IDE Tutorial
So to make sure what I understand from vogella's helpful instructions, if I add the JFreeChart library, which is distributed as a .jar to my project, I can utilize it's classes in my own code. Then when I export my own project as a runnable .jar to the end user, the application will contain the JFreeChart library. Most importantly, the end user won't have to do anything special to use my app because the library is contained in my exported application. Correct? :)
Re: Deploying Application Using JFreeChart Library
for Netbeans, the libraries are put in directory called lib and if you look inside the jar, you will see the libraries in the lib directory.
I haven't work with eclipse enough to know whether eclipse does the same, but I would think the libraries would have to be in the jar file.
Re: Deploying Application Using JFreeChart Library
Quote:
Originally Posted by
shall
for Netbeans, the libraries are put in directory called lib and if you look inside the jar, you will see the libraries in the lib directory.
If you look inside the lib folder you will find the jars.
Quote:
Originally Posted by
shall
I haven't work with eclipse enough to know whether eclipse does the same, but I would think the libraries would have to be in the jar file.
No, the dependency jars would have to be in a folder, and on the classpath.
Java doesn't support nested jars.
db
Re: Deploying Application Using JFreeChart Library
db, care to weigh in on my post #4? Specifically regarding end user-side?
Re: Deploying Application Using JFreeChart Library
Since this is now an Eclipse related question, I'm moving it from AWT/Swing. It was never an AWT/Swing question in the first place.
db
Re: Deploying Application Using JFreeChart Library
Quote:
Originally Posted by
DarrylBurke
If you look inside the lib folder you will find the jars.
No, the dependency jars would have to be in a folder, and on the classpath.
Java doesn't support nested jars.
db
Oops.. Sorry about that misinformation. When I thought I was looking at the contents of the Jar in 7zip, I was actually looking at the directory that contained the jar.
Re: Deploying Application Using JFreeChart Library
Quote:
Originally Posted by
Redefine12
db, care to weigh in on my post #4? Specifically regarding end user-side?
You would need to provide the user with the JFreeChart jar as well.
Probably using the same structure as Netbeans does, which is:
Code:
<app-folder> -
<your jar file>
lib -
<any jar files required by your jar file>
You could distribute that <app-folder> as a zip and simply have them unzip wherever they want, but that requires the end-user to have Java installed, or you could look at using an installer.
Note that your jar file Manifest needs to reference the dependent jars.