Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

migrated from Jan 16 '11 at 16:23

This question came from our site for professional and enthusiast programmers.

marked as duplicate by gnat, MichaelT, GlenH7, amon, Ampt Dec 10 '14 at 21:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

When asking questions like this it is useful to also add the link to the page with the license. – Loki Astari Jan 16 '11 at 17:12
up vote 13 down vote accepted

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)
share|improve this answer
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 '11 at 17:55
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. – Dzmitry Lazerka Apr 26 '15 at 20:25

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.

share|improve this answer

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.

share|improve this answer

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