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.

nbro
  • 15,395
  • 32
  • 113
  • 196
GuruKulki
  • 25,776
  • 50
  • 140
  • 201
  • 2
    good question. Is the JVM open source (hotspot) or are the cools such as the javac compiler open source as well? – D.C. Jan 08 '10 at 21:24
  • 2
    OpenJDK encompasses the tools, JVM, class libraries, and probably a lot more. – Kevin Bourrillion Jan 08 '10 at 21:33
  • Kevin: Good point. My source was Wikipedia, but it seems that this info has been outdated by the release of JDK6. http://en.wikipedia.org/wiki/Java_(programming_language)#History – kusma Jan 08 '10 at 22:14
  • The OpenSource head-honcho at Sun just quit. Make of that what you will. http://www.theregister.co.uk/2010/03/09/simon_phipps_quits_sun_oracle/ – skaffman Mar 09 '10 at 22:51
  • FYI, an alternative open source Java is Apache Harmony. However, development stopped in 2011. Also see http://en.wikipedia.org/wiki/Free_Java_implementations – ToolmakerSteve Jun 18 '14 at 01:40
  • Much more recent, from Oracle, are two alternatives. Completely open [OpenJDK](https://jdk.java.net/). Nearly open (finally) - some licensing conditions: [OracleJDK](https://blogs.oracle.com/java/post/free-java-license). OpenJDK is now in sync with OracleJDK, based on same code with all the bug fixes over the years. (According to Oracle; I have not verified.) See also [OpenJDK](https://openjdk.org/). – ToolmakerSteve Sep 23 '22 at 19:10

11 Answers11

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.

kusma
  • 6,516
  • 2
  • 22
  • 26
  • 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). – Tom Hawtin - tackline Jan 08 '10 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. – Rob Oxspring Jan 08 '10 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. – ToolmakerSteve Jun 18 '14 at 01:27
  • correction: as part of "OpenJDK". This is distinct from the original Sun "JDK", which had more restrictive licensing. See http://openjdk.java.net/ for current version and news. – ToolmakerSteve Jun 18 '14 at 01: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.

paxdiablo
  • 854,327
  • 234
  • 1,573
  • 1,953
  • 11
    This answer is talking about the Development Kit, the question asks about the language. – Rob Oxspring Jan 08 '10 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 '10 at 06:27
  • 1
    The Oracle-Google case is finding out whether the Java API's are so open that Google could copy them in Android. – Thorbjørn Ravn Andersen May 16 '14 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. – ToolmakerSteve Jun 18 '14 at 01:19
  • See anonymous' answer for more info on the legal distinction between language and core libraries/development kit. – ryanwebjackson Nov 29 '21 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.

Thomas Owens
  • 114,398
  • 98
  • 311
  • 431
  • 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 08 '10 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
ABcDexter
  • 2,751
  • 4
  • 28
  • 40
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.

Eastern Monk
  • 6,395
  • 8
  • 46
  • 61
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"...

anonymous
  • 71
  • 2
  • 6
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

curtisk
  • 19,950
  • 4
  • 55
  • 71
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 ?

Shyam D
  • 7
  • 2
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).

Horatiu Jeflea
  • 7,256
  • 6
  • 38
  • 67
1

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

illahi
  • 21
  • 2
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