85

I know that Python, Ruby, Perl are all open source, but is Java really an open source programming language?

I have been searching on Google too, but I didn't find a proper answer.

6

11 Answers 11

87

A programming language isn't in it self open source or not, but an implementation of it might be. Yes, there are open source implementations of Java. Sun's Java implementation (the most popular one), is one of them.

4
  • 2
    Well, the current "JDK6" is "disclosed" source (under JRL, JIUL, and probably others). OpenJDK (6-open and 7) are GPL (optionally with the CLASSPATH exception). Jan 8, 2010 at 22:05
  • @Tom - I think you're missing the point - the question is asking about the language and not about the runtime or development kit implementations. Jan 8, 2010 at 23:51
  • 3
    To be technically correct, Sun released a Java implementation as open source, as part of the JDK. There was also internal Sun code and tools, that never were open source. Now that Oracle owns the patents and the Sun code, the situation is murkier: Oracle sued Google merely for use of APIs in Java. en.wikipedia.org/wiki/Oracle_v._Google Also consider www.cnet.com/news/apache-foundation-quits-proprietary-java-process/ "Saying the platform is completely under Oracle's control, the Apache Software Foundation resigns from the Java Community Process Executive Committee." Dec 10, 2010. Jun 18, 2014 at 1:27
  • correction: as part of "OpenJDK". This is distinct from the original Sun "JDK", which had more restrictive licensing. See openjdk.java.net for current version and news. Jun 18, 2014 at 1:33
25

Yes, or it will be eventually (there may still be some things they're working on replacing since they were used under licence). Sun committed to making it open source and you can download it from them. Check out OpenJDK.

5
  • 11
    This answer is talking about the Development Kit, the question asks about the language. Jan 8, 2010 at 23:52
  • 22
    Well, I don't think that actually makes sense, @Rob. All languages would be open source since they're specified (the source being the specs on how things work, for example ISO C, the language, is open source because of the C99 standard). It makes far more sense to talk about the source code for an implementation of a language being open source. If you're talking about whether a language allows community input on its evolution, that might make sense but, since the OP accepted this answer, I'm going to assume my interpretation was the correct one :-)
    – paxdiablo
    Jan 10, 2010 at 6:27
  • 1
    The Oracle-Google case is finding out whether the Java API's are so open that Google could copy them in Android. May 16, 2014 at 13:38
  • 1
    @RobOxspring: For some languages the "Development Kit" is only tools and add-ons, the core language & its libraries is a separate entity. I imagine that was originally true for Java as well. (Or maybe the JDK included it, but with a restrictive license.) HOWEVER, now that Sun did an open source release, the JDK INCLUDES an implementation of the java class libraries. This can be seen by BROWSING the JDK. For example OpenJDK > jdk8 eventually browses down to src/share/classes/java/awt/Graphics2D.java, which is actual java code for the Graphics2D class, in release 8. Jun 18, 2014 at 1:19
  • See anonymous' answer for more info on the legal distinction between language and core libraries/development kit. Nov 29, 2021 at 17:21
16

The "official" SUN implementation of the language itself is not, but there is a community-driven process (not sure how well it works) for suggestions to improve the language - the Java Community Process. There are also open implementations of the Java development tools and runtime, such as OpenJDK.

1
  • You may want to clarify what you mean by official. Sun itself is driving the OpenJDK effort although whether that continues under Oracle, I don't know.
    – paxdiablo
    Jan 8, 2010 at 21:26
9

Not yet, but it is soon about to go open source.

source:


Quoting from https://blogs.oracle.com/java-platform-group/faster-and-easier-use-and-redistribution-of-java-se :

  • Oracle is proposing to increase the release cadence of Java SE to every six months
  • Oracle will simplify how developers, customers, and consumers use Java SE
  • Starting with JDK 9 GA Oracle plans to ship OpenJDK builds under the GPL
  • Oracle has proposed a time-driven release model for Java SE instead of the historical feature-driven model
  • Oracle JDK will contribute previously commercial features such as Java Flight Recorder to OpenJDK
  • Oracle will work with other OpenJDK contributors to make the community infrastructure complete, modern and accessible
  • The Oracle JDK will continue as a commercial long-term support offering
  • The Oracle JDK will primarily be for commercial and support customers once OpenJDK binaries are interchangeable with the Oracle JDK (target late 2018) Oracle will continue to enhance the packaging and distribution of complete ready-to-run applications

We have moved Java EE onto :http://openjdk.java.net/projects/jdk9/spec/

Further reads:

  1. https://blogs.oracle.com/theaquarium/opening-up-ee-update
  2. https://blogs.oracle.com/java-platform-group/java-se-offerings
  3. https://blogs.oracle.com/java/java-9-release-now-available
  4. https://blogs.oracle.com/java-platform-group/convergence-of-oracle-java-se-embedded-with-oracle-jdk
8

The phrase "Java Programming Language" refers to the specification as provided by Sun (now oracle). Sun provides a reference implementation of Java Virtual Machine and Java Compiler. Both of which are not open source (at least not fully like say Python).

However OpenJDK for example is a complete open-source implementation of JAVA programming language. There might be more as well.

Most of the programmers think of Java as a programming language provided by Sun. I think Sun only provides the language specification implementation can be done by anyone under any license.

7

From Oracle America Inc v. Google LLC No. 3:10-cv-03561-WHA:

"... At issue in this appeal are 37 API packages from Java SE Version 1.4 and Version 5.0. We have already concluded that the declaring code and the SSO of the 37 Java API packages at issue are entitled to copyright protection. Oracle, 750 F.3d at 1348. The Java programming language itself is free and available for use without permission. At this stage, it is undisputed that, to write in the Java programming language, “62 classes (and some of their methods), spread across three packages within the Java API library, must be used. Otherwise the language itself will fail.” Order Denying JMOL, 2016 WL 3181206, at *5. It is also undisputed that anyone using the Java programming language can write their own library of prewritten programs to carry out various functions. Although Oracle makes the Java platform freely available to programmers building applications (“apps”), it devised a licensing scheme to attract programmers while simultaneously commercializing the platform. In relevant part, Oracle charges a licensing fee to those who want to use the APIs in a competing platform or embed them in an electronic device. To preserve the “write once, run anywhere” philosophy, Oracle imposes strict compatibility requirements on licensees. Oracle, 750 F.3d at 1350. Oracle also made available without charge under an open source license a version of Java called “OpenJDK.” Order Denying JMOL, 2016 WL 3181206, at *10. Oracle maintains, however, that OpenJDK came with an important catch: any company that improved on the packages in OpenJDK had to “‘give away those changes for free’ to the Java community.” Appellant Br. 53. The evidence showed that Oracle licensed Java in 700 million PCs by 2005. Although Oracle never successfully developed its own smartphone platform using Java, it licensed Java SE for mobile devices. According to Oracle, the “mobile device market was particularly lucrative,” and ORACLE AMERICA, INC. v. GOOGLE LLC 10 “Java quickly became the leading platform for developing and running apps on mobile phones.” Appellant Br. 9. ..."

Parts of the language are subject to license fees, so those sections don't appear to be "open source"...

2

Most of "Java" is open source, there is some small portions that Sun doesn't have the rights to open up...check out the site for OpenJDK for more info

1

OpenJDK after you download it in a src folder you have windows,solaris,share,linux in the share folder, you can find classes. There you can see the source code of all classes (ex. JButton).

1

On November 13, 2006, Sun released much of Java as free and open source software, (FOSS), under the terms of the GNU General Public License (GPL). On May 8, 2007, Sun finished the process, making all of Java's core code available under free software/open-source distribution terms, aside from a small portion of code to which Sun did not hold the copyright.

OpenJDK (Open Java Development Kit) is a free and open source implementation of the Java programming language. It is the result of an effort Sun Microsystems began in 2006. The implementation is licensed under the GNU General Public License (GNU GPL) with a linking exception.

Why there are still people that say Java is not open source or free as in free speech ?

2
  • 4
    Because now its owned by Oracle. Jan 23, 2014 at 6:33
  • 1
    Because you get sued by Oracle when you use it, once you start making lots of money. Not so with other "clearly free" languages.
    – b264
    Sep 22, 2016 at 20:28
1

Java Language is open source there is few segments that Sun doesn't have the rights to open up...check for more OpenJDK

1

Oracle annouced, that they are along with IBM and Red Har moving Java to Open source platform, Eclipse Foundation.

https://blogs.oracle.com/theaquarium/opening-up-ee-update

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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