This question has been asked multiple
times I know. From what I understand,
broadly speaking, if I include a GPL
module in my app, I have to also
release my app's source code for free.
That's not quite right.
If you include a GPL module in your app, then:
- Your app must itself be GPL (except in certain cases, like LGPL, modified GPL, or if the module meets the legal definition for being a "separate program")
... and any GPL code is subject to the condition that
- If you sell or distribute the program, then you must make the source code available to the recipients of the program, and confer them rights to further modify/sell/distribute it under the same conditions.
So you are allowed to sell GPLed code, however whomever you sell it to can then start giving it away for free (if you inform them otherwise, then you are violating the GPL).
Now if the module is a java app (which
I have modified)
The modified module is definitely GPL.
and included in my
own java app, and say I use it as an
applet on my website, do I need to
distribute the source code to all the
users visiting the website?
Can I distribute the code only to people who ask for it?
If the code runs server-side, you do not need to make source available. If it runs client-side, then you must basically offer "equivalent access" to the binaries and the source, though they do not need to be packaged together. However as I understand it, if the client didn't contact you in order to get the applet, then he shouldn't have to contact you to get the source.
If I sell my applet, do I need to distribute the source code
to all the users or ONLY to the users who purchase my applet?
Only those who purchase the applet. However, they must have the right to modify and redistribute it, under the terms of the GPL.
Note: I am not a lawyer.