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."
Then where is it, behind a door that says "Beware of Leopard"?
Ryan - http://www.thecosmotron.com/
http://wwws.sun.com/software/communitysource/j2se/ java2/download.html
All clear?
That's "Mr. Soulless Automaton" to you, Bub.
The situation is pretty good now, but it certainly hasn't always been like that.
Instead of saying anything rude, here is the f*cking link:
/ java2/download.html
:-)
http://wwws.sun.com/software/communitysource/j2se
That said, the license is somewhat less than free
Its partially available, on a windows system its here:
C:\Program Files\Java\jdk1.5.0_06\src.zip
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.
Download the JDK from java.sun.com. Unzip the download. The source code is located in src.zip. Has been for years.
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.
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.
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:
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.
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.
...it's Cocoa! : D
(burn, karma, burn!)
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
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.
/.'d at the moment.
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
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.
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.
This is great news, I always wanted to remove that pesky garbage collector....
You can get the native c code for the vm and such from here: http://java.sun.com/j2se/1.5.0/scsl/README-SCSL.ht ml
That's not open source.
From your link: "The current model for Java is close to an open source model, Gosling said." So, he's not saying it is.
And the way that the "Open Source Community" uses the term "open source" is really beyond the plain meaning and historical usage of the term; and only makes sense if you've had your ideological briefing. Java is open source in the sense that the source code is open and accessible. It just doesn't meet the "Open Source Definition".
Whenever I hear the word 'Innovation', I reach for my pistol.
"It's been there for years," Sun CTO Ned Baker replied, "just grep your /java/bin directory for the string 'malloc(all);' and you'll find it."
"Made up/misattributed quote that makes me look smart. I am on
IDEA is also a lot better than Eclipse functionality-wise but that's not really releveant for this comparison.
The JRE is part of the JDK.
Fear: When you see B8 00 4C CD 21 and know what it means
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.
Eclipse is running pretty well on the ubuntu 5.10 I must say. I've installed the Sun JDK 1.5 (that's the version we developers still use :) and the latest Eclipse version. I've seen some small idiosyncrasies with GNU classpath, but even that run pretty well. One should not use the default version of Eclipse. Since the installation normally consists of unzipping and running the eclipse binary, you are advised to use the latest version anyway. And I must admit that previous versions were way less responsive. It's still less responsive than Eclipse under Windows, but it definatly is workable.
SWT is far from perfect. It's definately more a hack than Swing, which is setup very neatly. But it does not matter, it's pretty smooth, has very nice widgets and always uses the underlying platform L&F. The Swing default is the Sun look and feel, which is beautifull, but not something I want. On most applications you cannot set the L&F yourself, and the developers choose either Swing L&F, the platform L&F or even worse, AWT. As long as the Swing applications are not in agreement *themselves* and as long as Sun does not make the platform L&F the default, Swing is doomed.
Ummm...that error message just says you need to download the source code in order to build it.
The "restrictive license" you refer to allows you to make any changes you want to the source, but to call your code "Java" it has to pass Java certification. This is to enable the "write once, run anywhere" capabilities of Java.
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.
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.
I wrote parts of this stuff
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.
Although Sun has been generous with their source and created great opportunities for clever developers, Java has generated the need for a new cross platform OO language. The decision to implement generisity using type erasure has irrepairably damaged the run-ime integrity of the language. This will become more and more apparent as people become better aquanted with the new specification. Hopefully the open source community will build on the experience gained through working with Java to create a new truly type safe cross-platform OO language. If not... all hail .NET chime... chime... rattle.
That's the SDK. It's for developing Java applications.
<tweety-bird>He don't know Java wery well, do he?</tweety-bird>
As another poster pointed out, the JDK contains the JRE. In fact, the JDK is nothing more than the JRE + Compiler Tools. It's fairly easy to mod a JRE to become a JDK just by moving a few JAR files. (And the 'javac' executable if you want an easy way to launch the compiler.)
As a result, it almost always makes more sense to install the JDK rather than the JRE. The only purpose of the JRE is download size. Since it includes less "stuff" (including a lack of a soundbank!), it's a much smaller download than the JDK.
Javascript + Nintendo DSi = DSiCade
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.
Yes, Java is opensource.
In fact you can get the source code, if you accept to sign a licence restricting you to distribute a modified version or reuse the code elsewhere.
So basicaly: the source is availabile (it's opensource) but not reusable freely (it's not free software).
Sun executives often do this confusion when interpreting the F/OSS calls for a free java.
Meanwhile, linux distributors don't make the same mistake: that's why (java being considered non-free) you won't find the Sun jdk/jre in the redistributed medias of Debian, Fedora Core, OpenSuse or Ubuntu (and *BSD, even).
The parent is a troll (possibly an IBM troll).
Sun paid tons of money and spent years writing the class libraries. Why should they give their work away for free? They license this code to IBM, Oracle and BAE for a significant sum. Why should they give up this revenue?
Sun has changed the licensing for the JRE to allow it to more easily be integrated into Linux distros. The parent is either ignorant of that fact or deliberately omitting it.
Sun is less likely to maintain to maintain the standard if they open source the code. What kind of ass backasswards reasoning is this?
Why embrace SWT? This is IBM's attempt to bastardize the JDK. What's more, it's not pure Java. For instance, when I bought my Intel iMac, NetBeans 5.0(pure Java Swing) worked immediately, whereas an SWT library needed to be replaced for Eclipse. Why should Sun integrate a less than fully platform independent competitor's attempt to break a standard?
See this blog for more analysis on SWT vs Swing:
http://www.javalobby.org/java/forums/t18544.html
The jury is out on whether SWT is technically superior to Swing.
If you think Eclipse makes Java development easy, you obviously haven't used NetBeans 5.0, which is significantly superior to Eclipse in every way. It includes functionality out of the box (JSP compilation) that you need to pay for (MyEclipse) with Eclipse.
You obviously have an IBM bias with the following stated positions:
1) Open Source Java so IBM doesn't have to license class library source from Sun.
2) SWT should be included in JDK, thus polluting the standard.
3) Eclipse is the best IDE and makes developing Java "easy", with no mention whatsoever of the clearly superior NetBeans 5.0, or, for that matter, IntelliJ.
This space left intentionally blank.
src.zip doesn't have the sources to the sun.* packages, which contain classes that are not part of the API.
If you were talking about JVM's there are "competing implementations" please see http://en.wikipedia.org/wiki/List_of_Java_virtual
And perhaps when you were speaking of 'no standard for Java' you forgot to look into http://en.wikipedia.org/wiki/Java_Community_Proce
These issues are fixed in Java 1.6 (Mustang), due out Real Soon Now.
ZFS: because love is never having to say fsck
If you Google a bit you'll see that Gosling does know how it works and that this is by no means a new conversation. Saying that it is based on the Windows API has a grain of truth to it in that while it uses a number of APIs on different platforms, the most work has been done on the Windows API version and (this is just hearsay) that may have influenced the overall development as well.
Here's a good overview that I should have put in my original post:
SWT on Wikipedia
Rome wasn't bilked in a day.
Swing in Java 5 uses uxtheme on XP and it looks far better than other versions, but it is still superficial compared to a native app. Elements such as the file chooser mimic the common file dialog but behave nothing like the real thing at all. A simple demonstration would be to run SwingSet and right mouse on any file in the file dialog and see what popup appears. This is not exclusive to Windows. I suspect the GTK / Mac choosers are just pale imitations of their respective choosers too. Edit fields don't have a clipboard popup for cut / copy / paste operations. Accessibility tools like the Narrator also don't work. Other annoyances include the slow resize time and the way that you have to release a window sizing frame for the contents to resize.
All these little things are seriously distracting and make a Swing app stick out like a sore thumb. SWT apps aren't native speed but they're not far from it and they pick up the behaviour as well as look of the platform. Given the complexity of an app like Azureus, the performance of the UI is really rather impressive. I don't have a problem with the speed of Java, just Swing.
I have no problems with SWT-using apps like Eclipse and Azureus on GNU/Linux for either x86 or x86-64.
As an everyday user of Swing apps (and specifically jEdit) I assure you that under Java 5 Swing apps *do* look native enough. I have to strain my eye to find very slight differences. Note that many native win32 apps alter their look and feel uch more, "to stand out", probably. Opera on win32 looks less "native" than most Java apps, and newer MSO apps always keep going for some new and rather alien (though cool) look and feel.
Computers make very fast, very accurate mistakes
So is Skerrett being disengenous when he says that and, if he is, is he just getting back at Gosling for over simplifying?
Actually, I think he was just being polite. "I don't believe James really understands how Eclipse works" is a whole lot nicer than "James is lying through his teeth," which is what I would say.
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
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.
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!"
Also remember things like drag&drop, integrated spell-checker, support for text-to-speech code (the "speak text" command in the Edit menu), AppleScript responsiveness... those are all part of the "feel" of Mac OS, and Java doesn't do any of them.
Comment of the year
I'm a few years out of programming languages, but it sounds to me that you're butchering the use of dynamic vs. static languages. To my knowledge, dynamic/static is used in programming languages to refer to two properties: scope and typing. This is, of course, not to be confused with compiled vs. interpreted languages.
So, why are dynamically typed languages popular? They're popular because they know how to do things implicitly. We get these niceties like the ability to use numbers as strings without calling atoi, or use input strings to do math. Basically, dynamic typing lets you code faster because you don't have to constantly worry about casting things to the appropriate type.
Dynamically scoped languages are, in my opinion, rarely useful. The only valid use that I have ever had is to temporarily override a global parameter. For example, in Perl I might call local $/ = undef ; to temporarily enable 'slurp mode' in Perl. However, this is pure laziness, I could just as easily store $/ in a temporary variable and restore it when I'm through. Finally, even though languages like Perl are dynamically scoped, a sane programmer would never take advantage of this feature. How can you debug a value when you aren't sure where it came from?
Finally, Java/C are not free from runtime type detection errors. Java will happily throw a ClassCastException if you try to cast an Object to something that it is not. C makes it even worse and will dutifully make the cast and entirely muck up your data structures when you try to use the improperly cast object.
In my opinion, people don't use languages like Ruby/Perl/Python because they are superior architectures. They use them because they are easier to learn.