Results 1 to 10 of 10
  1. #1
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default 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!

  2. #2
    shall is offline Senior Member
    Join Date
    Apr 2012
    Posts
    199
    Rep Power
    0

    Default Re: Deploying Application Using JFreeChart Library


  3. #3
    shall is offline Senior Member
    Join Date
    Apr 2012
    Posts
    199
    Rep Power
    0

    Default Re: Deploying Application Using JFreeChart Library

    Also, look at post #9 at Graphs in Java.

  4. #4
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default 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? :)

  5. #5
    shall is offline Senior Member
    Join Date
    Apr 2012
    Posts
    199
    Rep Power
    0

    Default 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.

  6. #6
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default Re: Deploying Application Using JFreeChart Library

    Quote Originally Posted by shall View Post
    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 View Post
    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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  7. #7
    Redefine12 is offline Member
    Join Date
    Feb 2012
    Posts
    66
    Rep Power
    0

    Default Re: Deploying Application Using JFreeChart Library

    db, care to weigh in on my post #4? Specifically regarding end user-side?

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,184
    Rep Power
    19

    Default 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
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  9. #9
    shall is offline Senior Member
    Join Date
    Apr 2012
    Posts
    199
    Rep Power
    0

    Default Re: Deploying Application Using JFreeChart Library

    Quote Originally Posted by DarrylBurke View Post
    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.

  10. #10
    Tolls is online now Moderator
    Join Date
    Apr 2009
    Posts
    11,863
    Rep Power
    19

    Default Re: Deploying Application Using JFreeChart Library

    Quote Originally Posted by Redefine12 View Post
    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:
    Java 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.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

Similar Threads

  1. Replies: 23
    Last Post: 06-15-2011, 05:40 PM
  2. Deploying a JSF Web Application to a Server
    By Nivedita in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 05-01-2011, 09:07 AM
  3. Problem in Deploying j2ee web application
    By arshadalisoomro in forum Advanced Java
    Replies: 0
    Last Post: 01-24-2011, 02:23 PM
  4. error deploying Enterprise application
    By mihael in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 01-30-2009, 10:46 AM
  5. (Server)Socket application deploying
    By mdinant in forum Networking
    Replies: 0
    Last Post: 04-09-2008, 05:10 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •