Results 1 to 4 of 4
  1. #1
    Boomn4x4 is offline Member
    Join Date
    Nov 2011
    Rep Power

    Default Deploying a java application without external libraries.

    I have a java application that uses several 3rd party libraries. Up to this point, I've been exporting the java application (using Eclipse) to a runnable jar with those libraries packed into the jar. All has been well, but it started itching me how large the jar is. Considering this jar will be deployed over a WAN to thousands of work stations regularly, it would be best to make the package as small as possible. Where I'm at now, is I have Eclipse exporting the runnable jar and putting the external jar libraries in a sub folder next to the jar. This has considerably reduced the footprint of my application.... but I've come to realize that all of those jars in the sub folder already exist on the systems so it seems to be a waste of disk space to have a copy of them next to my application.

    I would think that there would be a way to create a runnable jar that utilizes the CLASSPATH variable to utilize the existing libraries instead of having to have a copy of them nearby. Is there.... Or better yet, is there a better approach.

    Thank you.

  2. #2
    jim829 is offline Senior Member
    Join Date
    Jan 2013
    Northern Virginia, United States
    Rep Power

    Default Re: Deploying a java application without external libraries.

    One possibility is to use a network based class loader to load the classes from one or more central sites. Then you don't have to worry about
    exporting them. Of course, that solution has its own set of complications.

    The JavaTM Tutorials | SSCCE | Java Naming Conventions
    Poor planning on your part does not constitute an emergency on my part

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Rep Power

    Default Re: Deploying a java application without external libraries.

    So the target systems all have the jar files you use all in the same spot?
    And all those jar files are the same version?
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Eastern Florida
    Rep Power

    Default Re: Deploying a java application without external libraries.

    Sounds like you need an installation program that can check the location and version of the extra jar files.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. Compiling with external libraries
    By sublixt in forum New To Java
    Replies: 5
    Last Post: 05-04-2012, 06:17 PM
  2. Replies: 23
    Last Post: 06-15-2011, 05:40 PM
  3. Replies: 3
    Last Post: 10-28-2010, 02:42 PM
  4. Replies: 1
    Last Post: 11-04-2009, 02:45 AM
  5. Deploying a java application on an web or appp server.
    By CharanZ in forum Advanced Java
    Replies: 1
    Last Post: 10-29-2008, 10:45 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