Possible Duplicate:
Can we use Java for commercial use?

I am a college student learning how to program in Java. I really like Java's simiplicity and portability and I would like to one day develop a commercial application in Java. What I am trying to understand is Java's GNU license.

With the recent litigation between Java and Google, I am a little bit skittish on developing any commercial applications in Java. As I understand it, I can only release my Java programs under the GNU license and I must release the source code. Do I have to buy a license from Sun to develop and release commercial applications in Java?

  • 2
    +1 Not a stupid question at all.
    – mre
    Jan 23, 2012 at 18:19
  • If you are truly concerned, please contact a lawyer who is familiar with this area of law. Remember that answers you may receive here are only the opinions of the public and are not proper legal advice.
    – cdeszaq
    Jan 23, 2012 at 18:22
  • 1
    If you actually had to buy a licence it would probably be from Oracle, as they bought Sun a while ago. Jan 23, 2012 at 18:25

1 Answer 1


Simple answer:

NO ! You don't have to buy any license from anyone

and this is why: It is true that Java is open source (till you try to modify the language itself) but you can copyright all the custom source code you have written. GNU license (now BCL under Oracle) is only for source code of the language itself and not for application specific java code you have written.

Related answer : Can we use Java for commercial use?

  • 1
    I can't find anything that suggests Java is released under the GPL. It appears the binaries are released under the BCL while the source is released under the Java Research License.
    – Thomas Owens
    Jan 23, 2012 at 18:34
  • 1
    Correct, well Java under Sun was shipped under GPL until it was bought by Oracle. fsf.org/news/fsf-welcomes-gpl-java.html
    – Liam
    Jan 23, 2012 at 18:38
  • 1
    I have been a Java developer for 7 years now, the code which is written for clients always contain copyright information of the custom code. Its pretty obvious clients pay for the code you write, Oracle cannot come to you and ask for that code. Its silly :)
    – Liam
    Jan 23, 2012 at 18:45
  • 1
    Your post says that Java is released under the GPL. I can not find anything to support this claim. In fact, everything that I can find suggests that nothing from Oracle is released under the GPL. Please provide a link to an Oracle page that says Java is released under the GPL or rephase your answer.
    – Thomas Owens
    Jan 23, 2012 at 18:47
  • 2
    @ThomasOwens, openjdk.java.net/legal is probably what he has in mind Jan 23, 2012 at 18:55

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