Results 1 to 2 of 2
  1. #1
    bohums is offline Member
    Join Date
    Feb 2011
    Posts
    1
    Rep Power
    0

    Default Compilation bloat

    I have a small Applet project that imports three java files from a large open source library with few hundred classes, which I link to the complete source and compile in my Eclipse project.

    My problem is, instead of just the few classes I use, this entire library is compiled and stuffed along with my Applet .class into a large .jar file.

    I suppose I can manually determine the subset of classes from the large library that my applet uses, and link these external sources only in my project.

    But that is very cumbersome. Is there a better way?

    By the way, in Eclipse, I link to complete external library as source, and create the .jar using the export feature.

    Also interested in knowing if the scenario I encounter is standard in Java or Eclipse?

    Thanks

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    In most of the cases, external packages have lots of classes and only using few for a single functionality or may be in an instance. If you add such external into your project and build, it'll bundle with your build as well.

    Unless the provider not provide such simple packages, then you've to manually remove them. But it's not an easy task. There can be references between them.

Similar Threads

  1. Help with compilation
    By santunez in forum New To Java
    Replies: 8
    Last Post: 10-18-2010, 01:31 PM
  2. Difficult compilation
    By pochis40 in forum Java Applets
    Replies: 10
    Last Post: 12-21-2009, 12:35 PM
  3. another compilation prob!!!
    By aiacos88 in forum JCreator
    Replies: 4
    Last Post: 01-27-2009, 03:16 AM
  4. Compilation Problem
    By whosadork in forum New To Java
    Replies: 6
    Last Post: 09-10-2008, 02:50 AM
  5. compilation issue
    By orchid in forum Eclipse
    Replies: 2
    Last Post: 04-20-2007, 12:51 AM

Posting Permissions

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