I develop an android application and in my app I use a libary (jar) that I download from the internet. This jar is open-source under the "GNU General Public License v2". I tried to read the text of the license but had difficulty understanding it.

My question is: can I use this libary without changing nothing in the jar in a commercial application? I will be making profit from selling my app which uses this GPL-ed .jar file.

If possible, I would like to avoid converting my application to open-source.

  • When asking questions like this it is useful to also add the link to the page with the license. Jan 16, 2011 at 17:12

3 Answers 3


GPL Required you to release source code for your distribution (In case of Full GPL but not lesser-GPL which is much more common in libraries)

But do not mix up with the following concepts.

  • You can still distribute any work for a fee thus making profit. (As long as you ship the binary with the source code)
  • You don't have to provide source code, if you don't ship/distribute any binaries, in case of SaaS (Software as a Service)
  • 3
    You do not have to ship the source with the binary. You do need to provide a way for a user to obtain the source, however. That could be through a link in an application about dialog for example.
    – Jeff
    Jan 16, 2011 at 17:55
  • 1
    Well, Google Play (aka Market) is going to distribute your app along with the library in binary form. No, GPL doesn't require you to release your source code. It requires you to release source code of that library, along with any modifications done to it. If you just use it, you don't have to open-source your usage results (same as you don't open-source everything you make using Linux). So as long as your app provides means of obtaining source code for that library (like Help / Licenses menu) -- you're ok. Apr 26, 2015 at 20:25
  • Note that the "SaaS" answer is only true in the case of standard GPL v2, as OP asked. If others come across this answer and have a library licensed under Affero GPL v2 or GPL v3, they should know that using the library in a SaaS setting qualifies as redistribution and triggers the requirement for the source code of the work to be released. Sep 30, 2016 at 12:05
  • 1
    Also worth noting that this gets complicated if you're talking about JavaScript libraries - if you're using a client-side library, it's probably being distributed to the user, thus the GPL does apply.
    – tr00st
    Jun 10, 2019 at 10:55

No, you can't. If the library is GPL you can't ship it with you no-GPL application.

But you can still make you application GPL, bacause you don't need to "open source" your software. You can still sell your software as long as everyone who buys it can access the source code. I.e. by downloading them from a protected (or even public) location or by shipping the source with the app. There is only one problem with this: Everyone who has the source code (in the above case: everyone who bought the software) has the right to redistribute it any way the GPL allows. This means you can't prevent them from making the source public or forking your app.


IANAL, but my understanding is no. The GPL is viral in nature (copyleft) so if you use or extend GPL-ed software then you are required to GPL your derived work.

However, most libraries are intended to be reused and the GPL license doesn't make sense. That is why there is the LGPL or "Lesser GNU Public License". This license allows you to use GPL-ed code in a library setting without requiring your application to be GPL-ed. If the JAR file is distributed under the LGPL you should be OK.

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