I have two plug-ins. One has the GNU LGPL 3 license and the other has the Apache Software License, Version 2.0. Can I use them in my commercial app? And if yes, what precautions should I take?

  • 17
    Keep in mind that you should NEVER EVER follow the legal advice that you get on the Internet, except if it comes from a lawyer. Preferably one who specializes in the given field, in this case: software licenses. So do take all the answers you get with a grain of salt, because otherwise you may be exposing yourself to lawsuits (since your app is a commercial one). Commented Feb 4, 2014 at 8:01

3 Answers 3


Can I use them in my commercial app?

It depends on what you intend to do with the software that you produce.

Firstly, neither ASL1, GPL or LGPL make any restrictions on what you can use software to do inside your organization. The restrictions are all on code that is distributed outside of your organization.

  • For GPL the restriction is that if you incorporate GPL'ed code into your own software, AND you then distribute your software outside of your organization, THEN you must make the source code available under the terms of the GPL or a compatible open source license.

    So if you use GPL'ed code in your application and you distribute it, then your application must be open source ... or else you are violating the license.

  • For LGPL, the restriction (see above) only applies to the source-code of the LGPL'ed library itself; i.e. if you change the library. If you just use the library, you are not required to make your source code available.

    There is also a restriction that the LGPL code in your application must be replaceable by the user of your code. That means (in effect) that if you distribute your code as binaries only, then you cannot statically link your code against that the library. You must use dynamic linking.

  • For ASL, the only significant restriction is that you must say if you have changed anything from the original version the ASL'ed code that you using.

Finally, just to make it clear, neither GPL, LPGL or ASL places any restriction on your purpose in using the software. And that includes whether your purpose is to make money. They just constrain the way you can make money ... and in the case of LGPL and ASL, the constraint is pretty minimal.

And if yes, what precautions should I take?

For LGPL and ASL, no precautions are necessary.

IANAL - I am not a lawyer. If you need to be sure, ask a real, qualified expert; i.e. a lawyer who specializes in software IP law.

1 - For the purposes of this answer, ASL == Apache Software License version 2.

  • Does this apply to a web application ? i mean customer will receive only the war file containing the .class and .JAR files. If all is LGPL still ok ?
    – Java Main
    Commented Apr 24, 2017 at 10:32
  • If you are not modifying the LGPL libraries then you can include them with your application code in the WAR file. But you need to do it in such a way that the person you are distributing your code to can replace the LBPL code with another version. An "uber-JAR" is probably a violation. Obfuscating the LGPL libraries together with your code is definitely a violation. (IANAL)
    – Stephen C
    Commented Apr 24, 2017 at 10:45
  • There is a folder called lib where i place all jar files. So he can relplace any Jar file with its other version. But i dont guarantee it will work always . Is that still ok ?
    – Java Main
    Commented Apr 24, 2017 at 10:52
  • Ask your lawyer :-)
    – Stephen C
    Commented Apr 24, 2017 at 13:12
  • It is just a normal web app running on tomcat. If you can help will be good. Anyway thank for your clarification really helping.
    – Java Main
    Commented Apr 24, 2017 at 14:09

The Apache License does not place any restrictions on software that links to a plug-in or library that is distributed under the Apache license. The LGPL on the other hand has the requirement that either the LGPL library links dynamically (and can be replaced by a user) or the entire work must be released under a GPL-compatible open-source license.

For the use in a closed-source application, this effectively means that you can use the Apache Licensed plug-in without restriction and that the LGPL licensed plug-in must be linked dynamically.

If you distribute either of the plug-ins along with your application, then you must also either provide the sources for the plug-ins or inform your users where they can obtain those sources.

  • BartvanIngenSchenau what do you mean by "closed-source" application? Do you mean packaged solution (not distributing source code), or do you refer to its distribution within an organization vs something like commercial distribution?
    – Rachael
    Commented Oct 16, 2015 at 17:16
  • 1
    @Rachael: "Closed-source" is usually used to refer to software for which the source code isn't distributed. Distribution within an organization is a bit of a special case when it comes to copyright licensing, because providing copies of a software product to people within an organization is not considered distribution for most copyright laws (it is considered copying). Commented Oct 23, 2015 at 15:03

First of all, this is not legal advise.

GPL software is not allowed to be linked to (including over network), be compiled into, or be shipped with non-GPL software of any form. LGPL loosens this up a little to allow non-GPL third party support, including for commercial products. The important part here is that it must be third-party (so to speak), which creates a small loop-hole.

In short, you link to an existing LGPL library (call this the first party), but the software that makes this link must be made LGPL. Call this this software the second party. Although the second party software must be released as LGPL, as the owner of the second party software you can allow other software to use it outside of the LGPL (as long as the second party software remains available under LGPL as well). In other words, the second party software must be made available as LGPL, but is not required to license it as LGPL under all cases. Every individual user of a software must have license to use said software by law. What I'm saying is that as long as each user has access to the software as LGPL, you can also license it using non viral terms. You can create the third-party software as well, in effect licensing the second-party software to yourself for use by the third party software under non-LGPL terms. I have even heard of people writing themselves a contract and license to use their own software. The law can be strange! The third-party software does not have to be LGPL in any case.

So what you do is create a library to link to the LGPL lib as just a wrapper, and release the wrapper as LGPL. You can then link to this wrapper (your wrapper) in non-LGPL software, as long as your wrapper is avaliable as LGPL.

I can't speak for the Apache Software License because I'm not familur with it.

  • Note that I'm using the term "link" very generically because this doesn't only apply to compiled languages and can also include "including" LGPL software (from local or a network location, such as with PHP or Javascript), or otherwise "linking" to a software over a network such as Java RMI etc.
    – JSON
    Commented Feb 4, 2014 at 7:53
  • 1
    "GPL software is not allowed to be linked to (including over network), be compiled into, or be shipped with non-GPL software of any form.". The "or" should be "and". You CAN use GPL'ed software in non-GPL'ed software provided you don't "ship" it.
    – Stephen C
    Commented Mar 6, 2014 at 13:42
  • 2
    That answer is wrong on so many levels. The question is not about GPL, but LGPL. ASL code can be integrated in code under almost any other licence, which means also LGPL or even GPL (even if the opposite is forbidden). You can even use it in closed source software. And, like Stephen C. pointed out, you can do whatever you want as long you don't publish it or make it otherwise available to public. Commented Aug 19, 2015 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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