Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

The Java is GPL license (reference from wikipedia). I am not sure I can use it in in commercial projects. I already have a website written in Java and I plan to use this for commercial use. Is that illegal?

share|improve this question

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

migrated from superuser.com Feb 27 '11 at 5:19

This question came from our site for computer enthusiasts and power users.

    
2  
@Sathya That question is about using a GPL plugin in a Java app. This question seems to be about the legality of using Java itself. –  Anna Lear Feb 27 '11 at 5:37
6  
@Shisoft Considering how many commercial Java applications are out there, I don't think you have anything to worry about. You'd see at least a few lawsuits if it weren't okay. –  Anna Lear Feb 27 '11 at 5:38
    
Java SE is no longer GPL it is BCL. Oracle is free to change the license as they please. (FAQ #8 oracle.com/technetwork/java/javase/overview/…). That being said, Oracle cannot renag older versions of Java released under the GPL. –  snmcdonald Feb 27 '11 at 5:38
3  
@snmcdonald OpenJDK 6 & 7 continue to be licensed as GPL with Classpath Exception. "Sun" JDK 6 and earlier have never been GPL. (IANAL) –  Tom Hawtin - tackline Feb 27 '11 at 13:51
show 3 more comments

8 Answers

The GPL license applies to the source of Java itself, not to applications created using Java. You should only be concerned if you are extending / modifying the Java language itself and reselling the result as a commercial product (or any other non-GPL license).

share|improve this answer
1  
Best answer so far+1 –  jasonco Feb 27 '11 at 6:28
6  
This is at the very best murky, which is why there is GPL with Classpath Exception. Code running on the JDK is linked to the Java library. Code linked to GPL code is supposed to GPLed (subject to the relevant jurisdictions' interpretation). (I am not a layer!) –  Tom Hawtin - tackline Feb 27 '11 at 13:45
1  
@tom - it's called the standard library exception - otherwise all code that called into a GPLed Linux kernel would have to be GPL –  Martin Beckett Feb 27 '11 at 22:58
3  
@Tom: which is exactly why the classpath exception exists, to ensure that compiled Java code (all of which relies on the standard libraries which are GPL if you downloaded the OpenJDK release, not if you downloaded the commercial release) does not have to be GPL. –  jwenting Feb 28 '11 at 7:52
add comment

OpenJDK is licensed under GPL with Classpath Exception. The Classpath Exception part is important. It allows you to use OpenJDK with software of any licence, not just the GPL. In particular, you can use OpenJDK with proprietary software.

share|improve this answer
1  
Thanks,What about sun-java ? –  Shisoft Feb 27 '11 at 5:35
2  
@Shisoft "Sun" implementations of Java SE 6 and earlier are licensed under a variety of licences, some of them free as in beer, but not [as yet] any flavour of GPL. OpenJDKs 6 & 7 (6 is a backward port of 7), are GPLv2 with Classpath Exception. It's intended to do a "Sun" release of JDK7 as well. –  Tom Hawtin - tackline Feb 27 '11 at 13:49
add comment

Java JDK binary is NOT GPL, it is BCL. Oracle is free to change the license as they please. (FAQ #8) That being said, Oracle cannot renege older versions of Java released under the GPL.

Always consult the License for up-to-date information. As of today the license states:

Internal/In-house use: The Java SE platform binaries (JDK and JRE) are licensed under Sun's Binary Code License (BCL) with supplemental terms. For most developers and end-users, the binary JDK and binary JRE are all that's needed to experience the world of Java technology. USE: The binary JDK and JRE are available at no fee from Sun (per terms of the BCL) for use with desktop personal computers. JDK or JRE use for embedded devices and other computing environments may require a license fee from Sun. Read more about embedded use of Java SE, or contact your local Sun office to obtain a license.

Keep in mind you cannot release Java SE on an embedded device (think Google Android) as stated by the FAQ.

The Java SDK source is available under the SCSL and JPL license.

Source Code: The JDK source code is available for researchers and others interested in exploring the details of the JDK. Each release has its own license or set of licenses which frequently includes the Sun Community Source License (SCSL) terms. Sun has recently started offering simplified access to the JDK source code under the a new Java Research License (JRL). Note that in either case (SCSL or JRL), if you decide to use your project internally for productive use or distribute your product to others, you must sign a commercial agreement and meet the Java compatibility requirements. Contact your local Sun office to obtain an agreement.

share|improve this answer
2  
-1 Your wording suggested that the Sun/Oracle-provided JDK distribution downloads were once GPL, but no longer. This is not true. They never were GPL. What was, and is, released under GPL, is the OpenJDK, which is different from the commercial JDK releases. As the copyright holder of OpenJDK, they are free to provide commercial, non-GPL, releases of derivatives of OpenJDK. –  Chris Jester-Young Nov 27 '11 at 16:36
2  
Additionally, in the OpenJDK FAQ: "Oracle JDK is based on the OpenJDK source code. In addition, it contains closed-source components. The final result is licensed under a Binary Code License." The closed-source stuff is stuff from third parties that they couldn't get relicensed. For a truly-free, complete OpenJDK distribution, there's IcedTea (which is what most GNU/Linux distributors use as their main Java implementation). –  Chris Jester-Young Nov 27 '11 at 16:48
add comment

You are confusing several things.

  • The GPL is a license concerning the redistribution of software. Even if the Java compiler you used was GPL'ed, this wouldn't prevent you from distributing your own software, because that's different from redistributing Java. (And the Java runtime can be downloaded separately from Oracle, anyway).
  • The GPL is not incompatible with commercial software. Some answers here seem to be confusing "proprietary vs free (as in speech)" with "commercial vs free (as in beer)". It's true certain care must be taken when selling GPL'ed software (selling does count as "redistribution"), but it's not impossible to do.
  • Oracle's implementation of Java is not GPL'ed. Read its license here.
  • Open JDK is a GPL'ed implementation, but as mentioned above, this doesn't make it incompatible with commercial software.
share|improve this answer
add comment

As I know , according to current license Java is under BCL(Sun's Binary Code License) , you can use JDK and JRE free for commercial use . Use ECLIPSE as your IDE as enty point to develop your Java code. It is an opensource one so you don't need any lisence for the same. When you are working on project , you will need many other tools to perform various stuffs. Most of required functions are given as plugins(downloadable) in eclipse.

share|improve this answer
add comment

After movement to Java BLC the entire licensing of Java usage is subject to interpretation which means "contact Oracle if you want to really sure".

That means pay if they want you to pay. As per BLC, Java can be freely used for "General Purpose Desktop Computers and Servers" (as in http://www.oracle.com/technetwork/java/javase/terms/license/index.html) , whose definition includes words "general purpose computing".

I don't know if my computing is a general purpose computing - are you sure that yours is? Oracle have also added clauses like "used for general computing functions under end user control".

Check with your legal department.

share|improve this answer
4  
This is FUD. I see plenty of companies around me, including big-name banks, using Java without any giving any thought to licensing problems. –  quant_dev Dec 31 '11 at 19:03
add comment

No. As far as I currently know, the GPL only limits the use of the source code of the code or program licensed with it (in this case, the program which runs Java code). But it does not limit the Java code itself.

share|improve this answer
    
I don't use the code,just its librarys.What about that? –  Shisoft Feb 27 '11 at 5:08
4  
1  
Your answer is ambiguous. Are you saying "no" to the title "can we use java for commercial use", or are you saying "no" to the last part of the question "is it illegal"? –  Bryan Oakley Feb 1 '12 at 14:06
add comment

You can compile an application using gcc, which is free software. Then you can license your app as you please, but not the gcc compiler.

share|improve this answer
    
Last time I checked, gcc didn't compile Java. –  Dan Pichelman May 15 '13 at 16:12
add comment

protected by maple_shaft May 15 '13 at 16:37

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

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