Slashdot Mirror


Sun Completes Java Core Tech Open-Sourcing

MsManhattan writes "A year after announcing its plans, Sun Microsystems has made almost all of the core technology in Java available as open-source software under the GNU general public license version 2 (GPLv2). However, some of the code remains 'encumbered'; that is, Sun doesn't have sufficient rights to release it under GPLv2, and the company is requesting the open-source community's help in resolving these issues. Rich Sands, community marketing manager for OpenJDK community at Sun, would not say what percentage of Java's 6.5 million lines of code are encumbered, but explained that it is largely Java 2D graphics technology, such as font and graphics rasterizing."

33 of 141 comments (clear)

  1. Not much of a surprise. by AKAImBatman · · Score: 5, Informative

    Rich Sands, community marketing manager for OpenJDK community at Sun, would not say what percentage of Java's 6.5 million lines of code are encumbered, but explained that it is largely Java 2D graphics technology, such as font and graphics rasterizing.

    In case anyone is wondering, this isn't much of a surprise to the Java community. When Sun was creating the latest and greatest Java libraries, they designed the APIs themselves to be generic. However, Sun generally licensed the underlying libraries for their reference implementation rather than developing them in-house. In the case of the Java2D APIs, they used code from Kodak to do all the fancy 2D rasterizations and transformations. This is why many Java coders thought that Sun's reference implementation would never be Open Sourced. (Happy to be wrong, BTW.)

    That code by itself could probably be replaced with a modern 2D rasterizer (similar to the types found in SVG and Canvas implementations), but it would need to be heavily overhauled to backport the VolatileImage support added in Java 1.4. (Basically, the JVM is able to manage the video card memory to store images for faster rendering and backbuffering.) I'm thinking that something OpenGL-based would be the best bet.

    However, that's not the only major library used. JavaSound also uses Dolby Headspace to render sound. It barely uses a fraction of the library's capabilities, but it would still need to be replaced. I don't know what was used for cryptography, but that would be replacable with a library like Bouncy Castle.

    All in all, the final code shouldn't be too hard to replace as long as Open Source equivalents can be found. However, these areas *do* require significant expertise, so don't expect that joe random can jump in the code and make it happen.
    1. Re:Not much of a surprise. by AchiIIe · · Score: 5, Interesting

      I would love to help myself
      As a longtime java developer, and advocate of the open source java, I think it's time to put my time where my mouth is. Albeit a few questions:
      * Where is the effort being organised
      * Is there a list of the methods that need to be reimplemented?
      * Have I been tainted -- I've seen java code before, If I reimplement something and it might look like the previous code, how do I guard against this?
      * Can we make java better?

      --
      Nature journal lied in Britannica vs Wikipedia Ask to retrac
    2. Re:Not much of a surprise. by TheLazySci-FiAuthor · · Score: 2

      I agree, code replacement does seem to be the most reasonable way to resolve this issue. However I cannot help but feel that this would prematurely cause forking and general divergence from the original closed Java.

      Additional features and improvements are no doubt going to occur as the result of opening up the code base, but I feel that compatibility should be at the forefront of any design decision when Java is involved.

      After all, isn't the whole point of Java interoperability, and hardware agnosticism (generics and enforcement of general good design and coding practices aside)?

    3. Re:Not much of a surprise. by ciroknight · · Score: 2, Interesting

      Wouldn't Cairo (cairographics.org) be the perfect fit for a software 2D rasterizer? Might not be the fastest but it's there, it's usable, even Firefox is jumping on the boat.

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
    4. Re:Not much of a surprise. by thePowerOfGrayskull · · Score: 2, Funny

      I would love to help myself
      As a longtime java developer, and advocate of the open source java, I think it's time to put my time where my mouth is. Albeit a few questions:
      * Where is the effort being organised
      * Is there a list of the methods that need to be reimplemented?
      * Have I been tainted -- I've seen java code before, If I reimplement something and it might look like the previous code, how do I guard against this?
      * Can we make java better? It seems to me that java.sun.com is the place to start looking for these answers, and not slashdot ;)
    5. Re:Not much of a surprise. by AKAImBatman · · Score: 4, Informative

      * Where is the effort being organised

      https://openjdk.dev.java.net/

      * Is there a list of the methods that need to be reimplemented?

      I imagine that the Graphics2D class as well as the VolatileImage class need to be implemented. The BufferedImage implementation may need to be modified to obtain the "Automatic Image" behavior seen in the Sun JVM. Depending on how much Sun has withheld, you may need to implement the GraphicsEnvironment code as well. I recommend asking on the mailing list for specifics.

      * Have I been tainted -- I've seen java code before, If I reimplement something and it might look like the previous code, how do I guard against this?

      The "tainting" problem was always an OSS community invention based on Sun's license wording. As long as the code you've seen is in the OpenJDK, it's quite impossible for you to be "tainted" as Sun has given it to you under the terms of the GPL. Of course, you should always consult a lawyer for the latest in paranoid-protective behavior, but I sincerely doubt that Sun would try and sue you over something they just gave you.

      * Can we make java better?

      You can do whatever the GPL license allows you to do. However, I imagine that OpenJDK won't accept anything more than implementation enhancements. New APIs need to go through the JCP for standardization before they can be accepted into a mainline JDK distribution. Again, ask on the mailing list for more details.
    6. Re:Not much of a surprise. by AKAImBatman · · Score: 4, Informative

      Update: Check here instead - http://openjdk.java.net/

    7. Re:Not much of a surprise. by myawn · · Score: 2, Informative
      I'm sitting in a JavaOne BOF right now where reification of generics (the fancy way of saying not throwing away type information) is being mentioned as a possible JDK 7 feature.

      There are some real compatibility issues in doing this (I remember Gilad Bracha covering this at a previous JavaOne), but it sounds like they are at least willing to take a look at it again.

      --
      Subscribers can see articles in the future? So what? Everyone gets to see them in the future.
  2. Serious question: Java, Apache 2, and GPLv2 by Anonymous Coward · · Score: 2, Interesting

    Apache currently has many Java-based Apache 2 licensed projects. The Apache 2 license is incompatible with the GPLv2.

    Does releasing Java under the GPLv2 effectively prevent the use of Apache 2 code (or any commercial code)? Does this mean that the only Java programs that can be used with the GPLv2 copy of Java are those under the GPLv2?

    1. Re:Serious question: Java, Apache 2, and GPLv2 by gedhrel · · Score: 2, Informative

      No, it doesn't. There was quite a deal of work that went into making sure that that was ok.

    2. Re:Serious question: Java, Apache 2, and GPLv2 by AKAImBatman · · Score: 4, Informative
      From the GPLv2, last published June 1991:

      If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works.


      In addition:

      However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.


      The second part is tenuous given the wording, but could be made to apply given Java's attempt to be the execution platform. However, the former part carries far more weight. Programming to the Java specification does not imply that you are basing it on a GPLed version.
    3. Re:Serious question: Java, Apache 2, and GPLv2 by slack_prad · · Score: 3, Informative

      GCC is GPL, but my gcc compiled malware program is commercial software.

      --
      Sent from my desktop computer
    4. Re:Serious question: Java, Apache 2, and GPLv2 by mhall119 · · Score: 5, Informative

      I'm giving up mod points on this article, but given the amount of misinformation you're getting, its better that I post a reply.

      Sun isn't using GPLv2, they are using GPLv2 + the Classpath exception. This is a modification to the GPLv2 pioneered by the GNU Classpath project. It basically makes Java's code GPL, but doesn't require code running on the JVM, or using the J2SE libraries, to be GPLv2 complaint.

      Links here:
      http://www.sun.com/software/opensource/java/faq.js p#g5
      http://www.javalobby.org/java/forums/t84256.html
      http://en.wikipedia.org/wiki/GPL_linking_exception

      --
      http://www.mhall119.com
    5. Re:Serious question: Java, Apache 2, and GPLv2 by AKAImBatman · · Score: 3, Insightful

      Sun is releasing the Java libraries under the GPLv2. The article never really explicitly makes that clear, but given that they're talking about the Java2D library it should be deadly obvious that they're releasing the entire J2SE library under the GPLv2.

      And? Whoopdie-fracking do. Let me see if I can translate this into idiot for you:

      Step 1: Go to http://java.sun.com/ and download a JDK.

      Step 2: Ask yourself, "Did I just agree to the GPL?"

      Step 3: Ponder the legal implications of never having agreed to the GPL, or in fact, having any GPLed code in your possession.

      Alternate:

      Step 1: Go to http://jcp.org/en/jsr/tech and find the Java API you're targetting.

      Step 2: Download the skeleton classes and use to create a program.

      Step 3: Ponder the legal implications of never having agreed to the GPL, or in fact, having any GPLed code in your possession.

      Just because Sun releases a version of the platform under the GPL does not automatically make the entire platform GPL. And in any case, the FSF interpretation of Java code has always been suspect anyway. Their interpretation of Java linking is flawed, and of dubious enforceability.

      However, this has always been more of an argument for the LGPL. If you develop with a GPLed version of a JDK, one could make a weak legal argue that you're extending the GPLed code in specific, and not the specification of the code. It would probably fail to hold up in court, but the possibility is there. Which is why the Classpath project issues this clarification of the license. It basically extends the OS exception to say that the Java classes are covered under similar terms. Not that it's legally necessary, as releasing the Classpath project cannot automatically make Java code fall under the GPL. But clarifies the position of using the Classpath library for development purposes. (Something which they couldn't enforce anyway.)

      Unsurprisingly, Sun has the same clarification for the GPLed code.
    6. Re:Serious question: Java, Apache 2, and GPLv2 by lpontiac · · Score: 2, Informative

      The OO concept of "derivation" is not the same as the legal concept of a derived work, even though they use the same English word.

      Furthermore, the GPL covers distribution, not use.

  3. Re:SUN and GPL by LDoggg_ · · Score: 4, Interesting

    No need to look the gift horse in the mouth here.

    Sun should be commended for this. It's not just a spec, but the best implementation avaialable.

    And don't forget, it's the same company that gave us open office.

    --

    "If they have both, tell them we use Linux. And if they have that, tell them the computers are down." -Dave Chapelle
  4. Re:Better Firefox integration? by AKAImBatman · · Score: 2, Insightful

    Currently, if I go to a page and the browser freezes for about 15 seconds, I think to myself, "This page must have an applet."

    That's caused by the JVM startup. The pause can be nearly eliminated by starting the JVM with the browser. Of course, that slows the browser startup and holds onto memory needlessly. So I doubt anyone is going to bother doing that for a dead technology. (i.e. Applets)
  5. The Sun Experiment by krelian · · Score: 5, Insightful

    (I posted this under the wrong story so I am copy pasting here....)

    I think most people in the F/OSS community don't see the importance of Sun's actions in the last couple of years regarding the economic viability of F/OSS.

    This is a company who opened sourced (or is open sourcing right now) a very large important and complex portfolio of it's software. It is also a company which is considered a major player in its field and a lot for these software products where successfully sold for big bucks in the past.

    F/OSS takes a lot of criticism regarding it economic model which most businessmen see as non existent. If Sun can pull it through and improve its financial results after making such a big commitment to F/OSS software, only than will the F/OSS community will have a winner in their hands to show off in front of skeptics. This is not the same as Red Hat who made a business out of F/OSS but a company which is rejecting the old ways of closed source and is taking a big gamble that F/OSS is not only the right thing to do morally, but that it can also become a better business model than closed source software.

  6. Gnu classpath ? by Salsaman · · Score: 2, Interesting

    Is there some reason why they (Sun Java) can't merge with GNU classpath ? It seems quite likely the latter would be able to provide all of the missing libraries, since they were working for many years on a free implementation of Java.

    1. Re:Gnu classpath ? by mhall119 · · Score: 3, Insightful

      Because it is much easier for Sun to just release 90% of their code under the same license used by GNU Classpath, then let the classpath guys, or anyone else in the community, figure out what of that missing 10% can be filled in with Classpath code.

      --
      http://www.mhall119.com
    2. Re:Gnu classpath ? by rabbit78 · · Score: 3, Informative

      Speaking as one of the GNU Classpath developers, I agree with that idea. However, there are some issues to be worked out, like the ownership of the code. GNU Classpath's code is copyrighted by the FSF and Sun's code is copyrighted by Sun. Both organizations require that contributors sign a copyright agreement before accepting code. I don't know about details, but I guess Sun and the FSF would have to arrange something before such a thing could happen. Luckily, Dalibor Topic, also a Classpath developer, is in the interim board, and I hope that this would help to arrange for the two projects to merge in some way. OTOH, I and my friends at Classpath will look into the encumbered areas and see how we can help out with the missing pieces.

  7. Re:I'm getting tired of this by AKAImBatman · · Score: 2, Informative

    Actually, that's the wrong page. For some crazy reason that's incomprehensible to the average human being, Sun moved the code to a different page. See here:

    http://openjdk.java.net/

    You'll note that those downloads include all the core libraries that Sun promised to release. Why don't they redirect users looking at http://openjdk.dev.java.net/ to that page? I have no idea, but there you go.

  8. Re:SUN and GPL by TheRaven64 · · Score: 5, Funny
    Yeah, Sun sucks. They haven't contributed anything worthwhile to the community. Well, except OpenOffice. And that whole NFS thing. Oh, and OpenSolaris. Well, and Java now...

    I stand by companies like IBM. I'm running Open Source AIX here right now. Oh, wait...

    --
    I am TheRaven on Soylent News
  9. Re:One word! by eviltypeguy · · Score: 4, Insightful

    OpenSolaris is open source and *free software* minus a few encumbered portions, just like Java. So I'm uncertain as to what you are referring to.

  10. Re:it's just HotSpot and javac by AKAImBatman · · Score: 3, Informative

    *cough* http://openjdk.java.net/ *cough*

    The http://openjdk.dev.java.net site is defunct.

    The important bits are all there, sans part of the Java2D and JavaSound implementation libs.

  11. Re:Help out with Harmony by Bert64 · · Score: 3, Insightful

    But why? Sun's JVM is much closer to completion, and also open source.
    Why not get one open source JVM working first, and work on others later?

    --
    http://spamdecoy.net - free throwaway anonymous email - avoid spam!
  12. Philosophy of exception: usage IS NOT derivation by Anonymous Coward · · Score: 2, Interesting
    Since you understand the Classpath exception well, you might be interested in an alternative explanation we've devised, which is both simple and exact.

    For elements licensed under the Classpath exception,

    USAGE of an element by linking does not imply derivation from that element.

    It's this key consequence of the exception that makes it so excellent.

    Nobody who is moderately sane thinks that when we use a car then the car-driver combination is a derived work of the car, and that therefore the copyrights covering the car must also cover the driver. Yet, that was the insane worldview of a few in the community who were adamant that simple usage was derivation and therefore engaged the copyright. The Classpath exception makes it certain that this cannot happen.

    The exception is a bit of a miracle, I'm not sure how we managed to get it past the GPL politicians. :-) But I'm glad it got through, and restored some basic commonsense.
  13. Re:Philosophy of exception: usage IS NOT derivatio by mhall119 · · Score: 2, Informative

    The term "linking" has actually caused a lot of confusion due to the difference between how Java links to libraries as opposed to C/C++. For C/C++, linking is much closer to a derivative work than in Java since (to my knowledge, I'm not a C programmer) when you "link" to a C/C++ library, you actually need the source code (or at least header files) from that library in order to compile your code, therefore including elements of that library's source in your final binary. In Java, you can "link" your code to a library's binary without including anything from it's source.

    --
    http://www.mhall119.com
  14. Thank you Sun and thank you RMS for the GPL by Anonymous Coward · · Score: 4, Insightful

    Sun contributes a lot to Open Source and produces very interesting hardware. Thanks for Java, thanks for OOo (which I find to be a huge pig but then I also find MS Office to be a mega pig), thanks for OpenSolaris... And thanks to RMS for the GPL. It's good to see Sun choosing the GPL (with exceptions) as their open source Java licence.

    Trolls are already in the thread saying that OOo is unusable and that (Open)Solaris is the most insecure Unix ever. The trolliest of them all even dare to say that Java is a failure... On this last point nobody should be mistaken: Java is a langage and a VM whose success is beyond any language author's wildest dreams.

    As stated by James Gosling himself not long ago: it is basically impossible to do a financial transaction today without having Java involved at one point or another... And this is a Good Thing (TM) Why is the banking industry so in love with Java? The bullet-proof JVM and portability of the languages. Not a single language before Java had ever offered such an incredibly good VM running on so many different hardware/software configurations.

    There are countries where tens of millions of people are carrying "Java SmartCards" on them. More than 90% of all cellphones sold worldwide have a J2ME VM (agreed: not Java's most glorious example, but nearly 20% of all games sold worldwide are little Java games for cellphones sold to casual gamers... Food for thought to anyone dismissing J2ME).

    Java is a success that has grown beyond anyone's wildest imagination and it just keeps getting better and better. I was an very early Java believer (back in the days where it was really messy to do Java development on Linux) and back in the days there were many misconceptions regarding Java. Nowadays it's simply unexcusable to try to deny that Java is a huge success. Like COBOL today, Java will still be the technology making the real-world work in decades (insert your lame jokes about COBOL here... I personally laugh everytime some COBOL is involved when you're making a real-world transaction [and, yup, I've done COBOL programming]).

    Note that (contrarily to C#/.Net) "Java the language" and "Java the VM" have been chosen because they were very impressive technologies, not because the company creating them had a monopoly on a certain market. C# is a copy (7 years later or so) of "Java the language", with some things done better (thankfully, 7 years later, that they got some things right ;) and some others done worse (*). This is a testimony to Java's quality as a third-generation OOPL (I'm not saying that third-generation language are the be-all end-all of programming nor that OO is the be-all end-all of programming, but simply that as an 3rd generation OOPL Java is very good).

    Thanks Sun.

    (*) C# has then been basically forced down the throats of programmers locked in the MS monopoly. If C# hadn't Microsoft's illegally maintained monopoly (the "illegally maintained monopoly" is a fact, checks your facts if you disagree) backing it wouldn't be anywhere near where it is today.

  15. Re:One word! by howlingmadhowie · · Score: 3, Informative

    there's been a rumour for quite a while now that sun will move solaris10 from the CDDL to GPL3 as soon as GPL3 is finished. (one should also mention that duke nukem forever will also be released under the GPL3 according to a similar rumour)

  16. Forget OpenSolaris! by Dr.+Smoove · · Score: 2, Interesting

    What about the poor folk like me running Linux on Sparc who can't use anything Java? Or some other architecture? Once this is complete it's going to be good for the non x86 Linux community.

    --
    "If you plant ice, you're gonna harvest wind."
  17. Re:Mozilla Had the Same Problem by KarmaMB84 · · Score: 2, Insightful

    Aside from scrapping nearly the entire Netscape codebase and starting over?

  18. Re:Better Firefox integration? by sveinungkv · · Score: 2, Informative

    Not to mention JavaFX. It is even to convert Flash files to it.

    --
    Spelling/grammar nazis welcome (English is not my first language and I am trying to improve my spelling/grammar)