Slashdot Mirror


Sun Says Java Source Already Available

mjdroner writes "In an InfoWorld article, Java CTO James Gosling says that source code for Java has been available for 10 years. Gosling claims Java is close to an open source model, though discounts Sun joining the Eclipse Foundation. He goes on to say that Eclipse's endorsement of the standard widget toolkit destroyed interoperability, saying it's based on the windows API, making it problematic to run on other platforms."

25 of 304 comments (clear)

  1. Oh yeah? by cosmotron · · Score: 5, Funny

    Then where is it, behind a door that says "Beware of Leopard"?

    --
    Ryan - http://www.thecosmotron.com/
  2. Re:It's available? by ENOENT · · Score: 5, Informative
    --
    That's "Mr. Soulless Automaton" to you, Bub.
  3. Destroyed Interoperabilty? by null+etc. · · Score: 3, Interesting
    Moses, come down from the mountain, please.

    Eclipse has shown that the market can indeed rally around Java optimized for Windows. Prior to SWT, remember running Together on cutting edge hardware, and the windows would still take 30 seconds to refresh? No one would tolerate the idea of running Java on Windows for Java's sake, when native apps absolutely destroyed Java apps in UI speed comparisons.

    It's time for the theoretical niceties of interoperability to meet the practical demands of customer acceptance within the Windows market.

    1. Re:Destroyed Interoperabilty? by magicjava · · Score: 4, Insightful

      Eclipse has shown that the market can indeed rally around Java optimized for Windows. I'm not trying slam SWT, but it hasn't really generated much of a market for Java desktop apps. To be fair, Swing and AWT haven't either, but your complaints about Swing being slow is a bit dated. Swing's pretty crisp these days. The problem really isn't the GUI front-end, the problem is Java as a whole has not made much of an impact on the desktop.

  4. Re:Concerning Java. by lokedhs · · Score: 5, Informative

    That's wrong. Just download the latest JDK. 1.5 or the 1.6 beta. Then double-click on SwingSet2.jar and try the demo. It's way faster than GNOME on the Linux machines I tried it on. And at least as fast if not faster than the Windows native widget set on at least some machines. Try it yourself. It really has come a long way since the early versions which were horribly slow.

  5. Re:Swing by lokedhs · · Score: 5, Interesting

    It's improved a lot in every release, SWT or not. Today it's pretty damn good on Windows. The situation is worse on Unix though, I can agree with that. On the other hand, SWT sucks on anything but Windows anyway.

  6. Re:It's available? by Homology · · Score: 3, Informative
    Mr. Gosling, please offer us a link to the code.

    Of course the source code is available, but you have to personnally agree to a restrictive license. This is why Sun Java is not easily available as the OpenBSD Makefile for 1.5 port shows:

    # Error message for distfile.
    FETCH_MANUALLY= "You must manually fetch the distribution files, place"
    FETCH_MANUALLY+= "them in ${FULLDISTDIR} and then run make again."
    FETCH_MANUALLY+= "Get the SCSL source \& binary files:"
    FETCH_MANUALLY+= " ${DISTNAME}-src-scsl.zip"
    FETCH_MANUALLY+= " ${DISTNAME}-bin-scsl.zip"
    FETCH_MANUALLY+= "from http://wwws.sun.com/software/communitysource/j2se/ java2/download.html"
    FETCH_MANUALLY+= "Get the BSD patchset file:"
    FETCH_MANUALLY+= " bsd-jdk15-patches-3.tar.bz2"
    FETCH_MANUALLY+= "from http://www.eyesbeyond.com/freebsddom/java/jdk15.ht ml"
  7. Re:It's available? by Mr.+Competence · · Score: 3, Informative

    That would be here under the SCSL or here under the JRL. Pick your license. For an explanation, go here. :P

    --
    Those who open their minds too far often let their brains fall out.
  8. Open source is more than that by DrXym · · Score: 4, Informative
    The source code to PGP is available too (for review), but it's not an open source product. Likewise, Java source may be available but it is not open source either. If GNU Classpath filched the Java runtime, you'd hear Sun screaming about it in no time.

    While I can understand Sun want to maintain control of the standard, they've got to open up the source. It sounds a little harsh considering .NET is not open at all (although MS do provide a reference version of their CLR), but it has to be done.

    Sun needs every friend they can get and putting Java into every distribution of Linux is one very good way to make a lot of friends. That means opening it up. Naturally they'd be frightened of some bastardized FrankenJava appearing, but they would still maintain the standards and the trademarks and they could enforce them. Who knows, perhaps opening the source will stimulate the platform once more.

    Another way of stimulating the platform is to embrace Eclipse & SWT. Sun may hate to admit it, but Swing sucks. It's a very nice and flexible API but in practice it sucks. Swing apps run with the grace and speed of a slug. Swing apps look weird even when attempting to look native. At least bundle SWT with the JRE and let people decide which to use. SWT has it's faults too, but it sure as hell transforms the UI experience of Java apps. Aside from SWT I cannot fathom why they won't embrace Eclipse. Eclipse makes Java development easy. The platform has been cursed with crappy tools (especially GUI editors) for too long and it will have to pull its socks up if it wants to compete with Visual Studio.

    1. Re:Open source is more than that by gluteus · · Score: 4, Insightful

      Like just about ANY toolkit, a lot depends on the ability of the developer using it. You can write lousy Swing apps, but if you know what you're doing, you can also write a pretty good one too. You might well argue that it's too difficult to write a good Swing app, but don't conclude from your failures that everyone is doomed.

      One thing that too many people here don't appreciate is that what Sun set out to do is almost impossible to get right the first time. Think about it, a cross platform, highly customizable GUI toolkit that mimics the look and feel of every platform it runs on. With one very major player (MS) set to break it.

      Look at what Apple did with Swing. A Swing app running on OS X can look almost like a native app, without breaking cross platform compatibility, because Apple EMBRACED Java and Swing. What would have happened if Microsoft did the same thing?

  9. The best Java windowing toolkit isn't Swing or SWT by mrchaotica · · Score: 3, Insightful

    ...it's Cocoa! : D

    (burn, karma, burn!)

    --

    "[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz

  10. BUT!!! by gameforge · · Score: 5, Insightful

    I enjoy scrolling up and down 15,000 line source code files as much as the next guy. That's why it's so much fun to look at the GCC sources.

    Occasionally, it's actually useful to see how someone implemented something, for educational purposes.

    But can I modify it, make it work on my new OS and processor and sell it without paying royalties? Maybe, distribute it under the GPL so it can come with FOS OS' in a truly free sense?

    Having source code isn't everything. Back in the old days, there was always source code for everything; UNIX on any of twelve or so different platforms wasn't binary compatible, but source compatible. So if you wanted to make a program and sell it, like PeachTree (yeah it's that old), you HAD to distribute the source code. Otherwise, you'd either have to distribute dozens of different binaries or stick with a single platform, which wasn't profitable.

    It was copyright infringement to make money by changing the code and selling it... and you couldn't give any of it away to someone who didn't have a license to it. And even if you did make modifications, you couldn't use them when the next release came out unless you ported them over each time.

    There's a difference between something being OpenSource and just having the source. Even if it's a free product like Java.

    What can you legally do with it? What separates it from being truly open source? I'd read the article, but it seems /.'d at the moment.

  11. Re:Swing by Kombat · · Score: 4, Funny

    Swing is a joke. It doesn't look native, it is a resource hog

    1995 called. They want your complaints back.

    You know, back when Java first debuted, its critics complained that it ran too slow. This was back when everyone was running 486 DX/100's, and Pentium 75's were just coming onto the market. Advocates of Java countered that hardware would soon be fast enough to render Java's slight speed disadvantage (due to being interpreted code) irrelevant. Plus, a JIT compiler was in the works to make Java run just as fast as native code.

    Guess what? They were right. We're not running 100 MHz machines anymore. We're running 2.4 GHz machines, and Java is just as quick and responsive as any other app. Today's machines have way more than enough CPU power and memory capacity to run even the largest Java apps with no delays at all.

    Time for you to come up with some new, fresh complaints.

    --
    Like woodworking? Build your own picture frames.
  12. Re:Swing by cecom · · Score: 3, Informative

    At least on my machine under Linux, Swing is definitely faster than SWT. Sounds almost absurd, but is true. I did a search some time ago and found posts claiming that IBM's official positions was that they were not interested in improving the speed of SWT-GTK. They can kiss my a** then :-)

    SWT-FOX (http://swtfox.sourceforge.net/) looks like a good idea and is supposed to be faster, but I have never been able to get it to work satisfactory (font problems, crashes). AFAIK, it is being maintained by a single person in his free time. Perhaps RedHat or Novel should support the project.

    Don't get me started on SWT anyway - I think the design is terrible; it looks like a somewhat cleaner port of MFC.

  13. Re:Swing by lokedhs · · Score: 3, Insightful
    It's faster on Windows too. An interesting comparison is IntelliJ IDEA versus Eclipse. IDEA is significantly faster than Eclipse, even though IDEA uses Swing.

    IDEA is also a lot better than Eclipse functionality-wise but that's not really releveant for this comparison.

  14. Re:Swing by adolfojp · · Score: 5, Insightful
    Sorry, but this appears to be FUD. If you want a native look and feel you need to put in one line of code to tell the UIManager to use it. A few more lines can give the user control of the L&F.
    No it doesn't. Every app in my system uses font anti aliasing. Every Swing app in my system doesn't. The Swing fonts will look awfull when compared to the fonts of everything else.

    Using themes doesn't work that great with Swing either (Not Swing themes but Gnome, KDE, Windows global themes). Swing apps will stick out like a sore thumb.
  15. Let's Define Our Terms by fm6 · · Score: 5, Insightful
    Half the issue here is that everybody (including the Slashdot editors, natch, but a lot of other folks as well) is very sloppy with the terms "Java" and "Open Source"

    Java is not the Java Development Kit, or any other specific peice of software. To Sun, "Java" is a trademark, so they can't even use it as a noun. But the rest of us can get by with thinking of Java as a collection of specifications: the Java language, the Java class libraries, and the Java VM spec. None of these is software — software can only be a implementation of Java.

    That might seem like a silly distinction, until you remember that Sun is not the only vendor for Java implementations. Not only are there commercial implementations, but there are open source implementations of all three, specs. Of course, these all lag way behind commercial implementations, as open source clones are wont to do.

    Anyway, when people say "Sun should open-source Java" what they really mean is "Sun should open-source their implementation of Java."

    Which brings us to:

    "Open source" is not software where the source code is freely available. It software where you can obtain the source code provided you agree to a license. That license specifies that you must make any changes to that source code available to anybody else who agrees to the same license.

    And here's a non-legal issue: if you're serious about making your product open-source, you don't just throw the source code over the wall and say "go crazy!" You make a serious attempt to fold contributed code back into your main source tree. That's a serious administrative cost, and a big reason so many companies are unwilling to OS their products.

    1. Re:Let's Define Our Terms by Raul654 · · Score: 3, Informative

      "Open source" is not software where the source code is freely available. It software where you can obtain the source code provided you agree to a license. That license specifies that you must make any changes to that source code available to anybody else who agrees to the same license. - This is not true. An open source licenses is one that lets you freely copy, distribute, and merge the code into your own projects. There are a number of open source licenses that do not attach themselves to derivative works, such as the Berkeley and MIT licenses (which are even freer than the GPL, in the sense that they have fewer strings attached)

      --


      To make laws that man cannot, and will not obey, serves to bring all law into contempt.
      --E.C. Stanton
  16. How open does it need to be? by Zigurd · · Score: 4, Insightful

    How open does Java licensing need to be?

    Answer: Open enough that the most important Linux distributions will include Java.

    It is correct that Java is close to being FOSS, but that makes it even more the pity that Sun could not make the few adjustments needed to attain this goal.

    Sun should by now be over the trauma of Microsoft attempting to hijack Java and accept things like SWT as the kind of sideshow that the Ubuntu/Kubuntu thing is.

  17. Yes, it is available... by mi · · Score: 3, Informative
    Yes, and the FreeBSD ports (jdk13, jdk14, jdk15) have been building the JDKs from source for years too.

    You do need to "register" with Sun to get the source, but same goes even for New York Times... The registration is free.

    --
    In Soviet Washington the swamp drains you.
  18. Re:Shills polluting the conversation? by nikster · · Score: 4, Interesting

    This is pretty childish, but here it goes. SWT is what Swing should have been, only Sun didn't invent it first. Sun went the wrong way when they chose "pluggable look and feel" over "looks native on every platform" and they still don't get it.

    You might think that a pluggable look and feel (PLAF) is more general - true. But in reality, in real-life apps, you don't want to shock users with your "different but good-looking" GUI. Instead, you want to look exactly the same as all other apps on that OS. In the real world, the PLAF makes the Swing code so complex as to be almost unusable / unfixable, costs an insane amount of engineering resources which explains why it performs well only on Windows, and remains largely unused. The thing which it is used for most often, namely to look like a native GUI, it does a pretty bad job at. Each new version of the Windows GUI demands a new Java GUI to keep pace.

    Had Sun spent all half the engineering time it spent on Swing on SWT instead, it would be perfect now. I just hope they include it as an official GUI framework in one of the next releases.

  19. Re:Swing by egomaniac · · Score: 3, Informative

    These issues are fixed in Java 1.6 (Mustang), due out Real Soon Now.

    --
    ZFS: because love is never having to say fsck
  20. Java being open sourced... by bill_kress · · Score: 5, Insightful



    Java developers, meanwhile, want to preserve interoperability and reliability, which is maintained by the current rules governing Java, Gosling said. To be certified as Java-compliant, software most undergo a test suite.

    "They really like the fact that we're very compulsive about the whole testing thing," Gosling said.


    Exactly. I think that the people calling for Java to be open sourced don't get the concept. Honestly, I think they must all be either people who are against java just because they have a platform they prefer (A very common occurrence among engineers) or they are trying to destroy the advantages of Java (Simplicity, slow and deeply considered addition of new features, compatibility) in order to make it easier to sell a competing product.

    The fact is, nothing will be gained from open-sourcing Java that you can't get by evolving the existing license (for instance, sun is modifying it to be able to ship the JDK with other products). On the other hand, much will be lost. Sun has been a creator and beneficial guardian of this language, and has crafted it into something that many users just love.

    Now, many people don't need Java. For instance, if you are making a smallish website, you are just stupid if you try to use java--use ROR or .net technologies that just slide together.

    However, if you have a project with an architect, a handful of software engineers and dozens of programmers working on a huge code base at the same time I don't think you can pick a better platform.

    If you are not in java's target audience, please SHUT THE HELL UP about it having to be open source. You don't have to feel bad about java not being appropriate for you! I give you permission to go use a scripting type of tool and solve your problem much quicker, but don't try to mold my favorite tool into something that fits your job just because it has a cool name and you think you should be using it because everyone else is.

    Those of us who really need java like it pretty much as it is--slow intelligent improvements, fewer terse, confusing or overloaded language features and a large number of users more interested in making readable/reusable code (as opposed to the users who just want to get the job done with write-once code). Overall it's just a good, solid, readable language, leave it at that.

    1. Re:Java being open sourced... by Ozwald · · Score: 3, Insightful

      Clearly you're as clueless as Sun.

      Why is everybody say "it works on my version of Linux"? What about the BSDs? Smart phones? Embedded devices? My own crackpot system using vacuum tubes? We don't want it all open source, all we want is the C code opened, changable, and distributable. The stuff that's platform dependant. Give me this, and I'll know that your JSP web page will work on my server (which it doesn't).

      Sun: You said you had a write-once-run-everywhere platform. Well? Where the hell is it? Do you really think we want the source so we can screw it up? We want what you promised, write once, run on my platform. And as long as I cannot build it for my platform, then it's of no friggen use. And no, you can't make OSS and third parties fill in the gaps, that's when you get the write-once-test-everywhere/lowest common demoninator fiasco that we have now.

      Oz

  21. Re:Shills polluting the conversation? by curunir · · Score: 3, Informative

    One thing that seems to get glossed over in the "SWT is optimized for Windows" argument is that SWT *is* open source.

    IBM put a whole lot of time and energy into optimizing for Windows because it allows them to sell WebSphere studio for Windows. Optimizing for other platforms isn't cost effective, so they didn't do it. But what they did do is release the source, so someone with expertise on other platforms can pick up the ball and run with it and, when it passes all the tests, be merged back into the main eclipse source tree. The extensive tests are key in facilitating this process.

    If SWT were to be included in the JRE, I think you'd see at least Apple (who distribute their own JRE anyways) spend sigificant effort in making SWT performant on OS X. I don't think its unreasonable to think that such an effort wouldn't be organized for Linux as well. But as long as SWT is just "that Eclipse thing", these efforts won't happen.

    My one quibble with what the GP said is the "SWT is what Swing should have been" comment. SWT wasn't designed to be what Swing tries to be. It was designed to be much less OS abstracted. Much of the ugliness of the underlying OS filters through into SWT (widgets requiring parent composites, requiring developers to call dispose, requiring developers to update widgets via syncExec and asyncExec). JFace, on the other hand, is much more comparable to Swing. It burries much of the ugliness of SWT and presents a much cleaner interface to the developer. It's a shame that the people at Eclipse chose to create only an SWT download and an RCP download and not a JFace + SWT download.

    --
    "Don't blame me, I voted for Kodos!"