tags:

views:

88

answers:

4

If not, why not always include sources file into "open source" JAR distributions ? (thanks in advance if you have some official weblinks that explain your answers)

+1  A: 

I don't see how including source files in a 'jar' or 'tar' or 'tgz' (separate or along with the binaries) would make any difference to you as long as you are able to access your 'open sources'

Ryan Fernandes
+3  A: 

There are usually separate JARs or ZIPs available containing JavaDocs or source files. Also, most IDEs allow you to specify source/doc files or folders for the JARs on your classpath.

If you use Maven, you can have it download source and doc files automatically, and also configure them as source files in your IDE (for Eclipse, at least).

Henning
This Maven integration is available in Intellij IDEA as well.
Don Roby
+5  A: 

No, it does not increase the memory consumption. And it's not done because it would increase the size of the JARs without providing any advantage to most users. And no, the JAR size is not irrelevant. It might not matter to you whether the download is 5 or 7 MB, but it matters quite a lot to whoever has to pay for the bandwith of 100,000 people downloading it.

Michael Borgwardt
+3  A: 

No, as far as I know, JARs with source code do not consume any extra RAM.

There are bandwidth considerations to always downloading Javadoc and source for third-party libraries, so perhaps in the name of saving a few bucks they don't include the source in their distributions and assume users can download it on their own if they wish. In the case of maven, for instance, it doesn't really make sense to download the source for your dependencies three levels deep, so caching just the class files is fine.

jasonmp85