• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Compilation bloat

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?

The way I am doing things 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
 
Greenhorn
Posts: 8
Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes, this is 'standard case in java'.
I'll skip details, I'm sure you will explore it some day, if you will make more java.

If you are sure which classes are required by your project, and if these classes are not using any other classes from mentioned jar file - you can copy them to your project, change the package (or not) and use them.
Of course only if the used library licence allows you to do that!
 
No matter. Try again. Fail again. Fail better. This time, do it with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic