7

I'm trying to determine what my legal obligations are if I use an MIT-licensed library (JAR file) in my program. Do I need to include the library's source code when I distribute my program? Do I need to include a README explaining the licensing of the packaged JAR? If I'm simply including the unedited JAR file, do I even need to include anything additional?

3
  • Isn't there some README or license already shipped with the code itself?
    – marktani
    Commented Jun 24, 2012 at 19:27
  • 1
    @mcwise Probably (if the authors aren't licensing oblivious), but it most likely only recites the text of the MIT/X11 license, which is more readable than most licenses, but doesn't contain an obvious (for non-lawyers) answer on this question.
    – user7043
    Commented Jun 24, 2012 at 19:49
  • If it is an exact replica, then I don't see a problem.
    – marktani
    Commented Jun 24, 2012 at 19:53

3 Answers 3

5

If you are including the library unmodified, you have absolutely no obligations.

The license asks you to include it's text in all copies or substantial portions of the Software. That you have to do with any license anyway, because you are obliged to tell the recipient the terms under which you give the software to them.

However since the license also allows you to sublicense, you can ship the complete bundle under any license you want (and you have to put it in documentation somewhere), but if you don't mention the library is under MIT license, it will be covered by your license for the whole bundle and that does not violate the MIT license terms.

The common practice is to not bother mentioning MIT license in binary-only distributions, because the user can't do much with the library anyway and simply keep the license notice (and more importantly copyright notice) in sources it applies to if you ever distribute them.

2

When the license ask you for including the license itself in your software, this does not mean "put a giant alert in the GUI of your program with this text in it", this simply means put this license in your source files, or, at least, in the biggest and most important source files.

for example at first you program or the portion/libraries that is MIT licensed is:

#include stuff

void foo();

int main(){
...
...
...
}

to respect the license you have to include the license itself

/************************
* Here is the full text
* interesting stuff
* bla bla bla
************************/
#include stuff

void foo();

int main(){
...
...
...
}

if you do not want to generate too much entropy in your code you can place the license at the bottom of your file, the important thing is just including license, of course the text of the license should be commented since they are not instructions for your compiler; just for the sake of clarity some people put the license at the bottom and just a reminder on top, a short phrase like "You will find the Terms of Use at the bottom of this file".

Done.

2

In many cases the JAR file itself will contain a copy of the license, you can check for that by opening it in a ZIP file utility. In that case, you don't have to do anything.

However, I think it's good practice to document all used libraries and their licenses (by name) somewhere in the project's documentation.

Not the answer you're looking for? Browse other questions tagged or ask your own question.