Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×

Will Sun Open Source Java? 700

capt turnpike writes "According to eWEEK.com, there's an internal debate going on at Sun whether to open-source Java. (Insert typical response: "It's about time!") Company spokespersons have no official comment, as might be expected, but perhaps we could hear confirmation or denial as early as May 16, at the JavaOne conference. One commentator said, "Sun should endorse PHP and go one step forward and make sure the 'P' languages run great on the JVM [Java virtual machine] by open-sourcing Java." Would this move Java up the desirability scale in your eyes? Could this be a way to help improve what's lacking in Java?"
This discussion has been archived. No new comments can be posted.

Will Sun Open Source Java?

Comments Filter:
  • "Open Source" covers a LOT of licenses.

    What changes and how would depend upon which license was chosen.
  • This would help (Score:1, Insightful)

    by k8to ( 9046 ) on Monday May 01, 2006 @11:13PM (#15242663) Homepage
    There are two major reasons I do not run java programs if I can help it in any capacity.

    1. Restrictive licenses make it more difficult to reasonably deploy than any competing technology in a linux environment.

    2. JVM is fat fat fat, it uses way more RAM than is reasonable.

    Other than these two issues, it would be reasonable to run java software on linux, even if I don't love the language, environment in some ways.
  • Third-Party JVM (Score:2, Insightful)

    by GetSource ( 807184 ) on Monday May 01, 2006 @11:16PM (#15242674)
    I think this could be an excellent idea, if only to allow for third-party JVMs.
    I, for one, have always seen Sun's JVM as bulky and slow on Windows PCs, and this is a large reason that I don't advocate its usage.
  • No (Score:5, Insightful)

    by aliquis ( 678370 ) on Monday May 01, 2006 @11:18PM (#15242690)
    "Will Sun Open Source Java?"
    No, haven't they already said that? Like hundreds of times? And does it really matter?

    "Sun should endorse PHP and go one step forward and make sure the 'P' languages run great on the JVM [Java virtual machine] by open-sourcing Java."
    "No", who would run PHP on Java anyway? Why? Why would open-sourcing it help?

    "Would this move Java up the desirability scale in your eyes?"
    No, Java is already desirable in my eyes.

    "Could this be a way to help improve what's lacking in Java?"
    No, what is lacking?

    People who complain that Java is slow, should be open-sourced, and so on have never seemed to had a clue.
  • by Xtifr ( 1323 ) on Monday May 01, 2006 @11:18PM (#15242691) Homepage
    > Would this move Java up the desirability scale in your eyes?

    It would certainly bring it across the threshold to something I might be willing to install on my machine. I'm not sure I'd actually be interested in using it for anything, but at least it would no longer be in the "completely unacceptable" column.

    Of course, I'd probably wait till it was "apt-get"able. But I suspect that an actually-Free Java(tm) wouldn't have to wait long to find a Debian packager.
  • Alternate VMs (Score:3, Insightful)

    by Flounder ( 42112 ) on Monday May 01, 2006 @11:20PM (#15242701)
    Could an open source be faster, more stable, and have better resource management than the Sun VM?

    Certainly couldn't do worse.

  • by SickLittleMonkey ( 135315 ) on Monday May 01, 2006 @11:28PM (#15242724)
    ... and just do it.

    WINE did it for Win32 and Mono did it for .NET, so Java *will* be open source some day anyway. Sun needs to get at least J2SE out there before .NET runs on every electronic device available.

    Now that Sharp's Zaurus has dropped Java, .NET is looking like the only alternative for managed coding on handheld platforms. (Cellphones are not yet good PDAs, ok?)

    SLM
  • Bad idea (Score:5, Insightful)

    by cpuh0g ( 839926 ) on Monday May 01, 2006 @11:30PM (#15242731)
    Why do people just assume that saying the magic words "open source" will automatically improve a particular piece of software? Rarely do the most vocal proponents of "open sourcing" something actually get involved and start contributing to the codebase. It's all about religion for the most part, unfortunately.

    I still fail to see the benefits of "open sourcing" Java. How will it be improved? It's not as if the engineers at Sun are stupid and don't know how to engineer enterprise software. Don't you think Sun has heard that same complaint from some major league/big $$$$$ customers and done everything they could to improve said performance?

    Even if they *do* open it up, Im sure the slashdot community will still hate them because they don't use a GPL variant license. Its a lose-lose situation for Sun, I don't get why they would even consider it. Is there a business case that will generate a 9-figure revenue jump from giving away the source for Java? I don't see it, but Im sure someone around here will happily clue me in.

  • Re:No (Score:5, Insightful)

    by Enonu ( 129798 ) on Monday May 01, 2006 @11:32PM (#15242740)
    Hear Hear!

    Will people stop trying to move Java towards a culture that won't keep Java up to the same standards Sun has? There's a reason why the top two server side platform these days are .NET and Java, and it's because a there's a quality standard and completeness not found elsewhere. The next time I look at another configured by altering it's code, hard tied to MySQL, non-tiered POS LAMP application, I'm going to cry.

    The only place I ever see Java going is perhaps to be bought by another bigger company who has a similar path. My only hope is that it's IBM because their Java apps are of a higher quality than Sun's, and they've done such good work with the Eclipse platform.
  • Re:No (Score:5, Insightful)

    by JanneM ( 7445 ) on Monday May 01, 2006 @11:34PM (#15242751) Homepage
    People who complain that Java is slow, should be open-sourced, and so on have never seemed to had a clue.

    Irrespective of any ideological issues, there are a few reasons the current situation hurts Java a bit.

    Foremost for quite a few readers of slashdot is that free Linux distributions can't include Java in their default install. That means Java-based apps are not going to be included either. And since users need to jump through quite a few hoops to get Java installed (don't say "it's easy" - for most people anything beyond using their package manager is too high a hurdle), you can't assume it will be available on desktops in general.

    The second issue is that Java does not really play well with the desktop. I have set up my desktop to run fine using three languages - English, Swedish and Japanese - and made sure everything from localization to character input works smoothly. But Java does not cooperate; it has its own way of dealing with CJK characters and needs its own fonts and separate setup to work. I have fiddled a little with it, but have never gotten it to work properly (especially being able to run an app in Swedish while still being able to input Japanese). And since it uses its own input method, it does not share the local dictionary so typing becomes frustratingly different from any other application I use. And since the code is not open, distributions can't fix these interoperability issues.

    Both of these issues serve as disincentives from using Java apps and from writing them in the first place.
  • same here (Score:3, Insightful)

    by r00t ( 33219 ) on Monday May 01, 2006 @11:37PM (#15242764) Journal
    Today, as far as I'm concerned, Java is:

    1. gcj (the gcc that does Java-to-JVM and JVM-to-native)
    2. GNU classpath
    3. Kaffe?

    I've never seen it do anything, either in a browser or in OpenOffice. Oh well.

    (not that language which overloads "+" for string+number is sane; that ought to be a compile error)
  • by Anonymous Coward on Monday May 01, 2006 @11:37PM (#15242765)
    No, Sun will not open source Java, they've repeatedly shown they have no interest in open sourcing Java (beyond the current incredibly restrictive license).

    Even if they do, it won't solve the main problems Java has:

    1. Massively bloated library. The current JRE I have installed has 77MB in the "lib" directory - those are simply ".jar" files that contain the core libraries!

    2. Massively bloated VM. Thanks to the massive class library I just mentioned, it takes FOREVER for the VM to start, because it has to first load the class library. The VM takes something like 5 seconds and 5MB just to do a simple "Hello World" application. That's not right.

    3. Massively broken VM. The VM is designed basically exclusively for use with Java. Yes, other languages can be shoehorned into the class format, but the VM is designed around Java's OO model. If your language doesn't use Java's messed-up "everything is a Java" model, combined with "except for static methods which belong to an object's static instance" - the class format won't work.

    Java is simply too bloated and too slow to be useful as an open source application. Maybe if it was open sourced before it ballooned out of control, but now, I doubt there's anything useful outside of Java in there.
  • Re:This would help (Score:3, Insightful)

    by rm999 ( 775449 ) on Monday May 01, 2006 @11:44PM (#15242809)
    "Also memory are cheap and who cares"

    I do... I knew a few other people who may also ;)

    For a good comparison of what c is capable of compared to java, compare the speed and memory footprint of azureus with utorrent. They have very similar functinality and interface, but utorrent uses about 1/5 the memory!
  • by BrainInAJar ( 584756 ) on Monday May 01, 2006 @11:48PM (#15242824)
    "Open Source" + "Sun Microsystems" almost certainly = "CDDL [sun.com]"
  • Oh, geesh..... (Score:3, Insightful)

    by deanj ( 519759 ) on Monday May 01, 2006 @11:48PM (#15242827)
    "Would this move Java up the desirability scale in your eyes?"

    Java isn't the answer for everything. Either is C, C++, Perl, Python, Ruby, or PHP. Each language has it's strengths and weaknesses.

    Nobody should be making decisions about what programming language to use based on whether it's open source or not. There are freely available implementations of those languages.

    If you've got your company, that's another story, do what you want. If you're basing decision on open source ideology instead of what's best for your employer, you're not doing your job.

    Is the employer always right? Hell no. But making decisions based on open source ideology instead of the right technical decision, you'll be no better than the managers "upstairs" you like to complain about.
  • by javacowboy ( 222023 ) on Monday May 01, 2006 @11:53PM (#15242859)
    Writing a fully compliant JVM takes a lot of time and a lot of effort, especially the class libraries. Sun spent years writing that code, and none of the JCP partners can be bothered re-writing it themselves.

    IBM, BEA, Oracle, etc pay Sun to license their source code so they can release compliant JVMs.

    So, it should be no suprised the the open *cough*IBM*cough* source community "demands" that Sun open source Java. Guess how much money a certain company would save getting free source code that they're paying to license now? In the same of "the open source community", they'd like nothing better than to get the #1 competitor's hard work for free so they stop having to pay them for it.

    The Java spec is open for anybody the re-implement, the source code is viewable by all, and the JDK is a free download. Sun has stated that they won't stand in the way of Apache Harmony or any other open source project that aims for a full open source implementation of the JVM/JDK spec.

    So what exactly is the problem?
  • Re:No (Score:4, Insightful)

    by TheWama ( 793038 ) on Tuesday May 02, 2006 @12:02AM (#15242917)
    How about the people who claim it's tedious and sprawling*?

    Simple example...

    Java: BufferedReader in = new BufferedReader(new FileReader("foo.in"));
    Python: in = open('foo.in')
    Ruby: in = File.open('foo.in')
    C++: ifstream in; in.open("foo.in");

    To be fair, I'm no Java expert, but in my experience with it, I'd have to be masochistic to look at it all day...
  • Re:This would help (Score:2, Insightful)

    by Anonymous Coward on Tuesday May 02, 2006 @12:20AM (#15242990)
    You are failing to recognise the hidden costs here. Memory is cheap, paying a programmer is not.
  • Re:Bad idea (Score:5, Insightful)

    by goldsounds ( 787265 ) on Tuesday May 02, 2006 @12:20AM (#15242992) Homepage
    Rarely do the most vocal proponents of "open sourcing" something actually get involved and start contributing to the codebase. It's all about religion for the most part, unfortunately.

    Rarely do the most vocal critics of "open sourcing" something actually understand the rationale behind free software, which is NOT to have the best code, NOT to have the most secure code, NOT to ship a product the fastest, NOT to contribute to the code, NOT to get something for free, or even to become the "commodity" implementation of a specification.

    The best reason to "open source" something is purely and simply the freedom to access the code behind the software you are running; the freedom to change, or port to another platform, the software that you purchased or downloaded. This is the original philosophy of the Free Software Foundation, and the GNU project, who were collectively the inspiration for the "open source" movement.

    So if you're wondering why anything less than a GPL license is unsatisfactory to the hairy, unwashed free-software factinista, why don't YOU look up the facts and get a clue about the software freedoms that may, one day, mean that your descendants can read e-books, watch movies and examine the collected creative output of humanity unencumbered by the imposed obscurity of closed-source software, DRM and other impositions on our freedom.

    Yes, this is about religion. It's about an idealogical divide between people who would rather have free-as-in-beer convenient software, rather than free-as-in-freedom software that preserves your rights. Frankly, your arrogant pragmatism nauseates me.

  • by IsThisBl**dyNameUniq ( 951317 ) on Tuesday May 02, 2006 @12:54AM (#15243133)
    Two major development platforms are .Net and Java. One is fairly Open Standard but not open source - and gets demands for Open Source. The other is not even open standard yet people accept this. Maybe the real issue is people can imagine a world where Java is totally open but don't ever expect .Net to be so don't bother discussing it (The wonderful Mono efforts aside)
  • Re:This would help (Score:5, Insightful)

    by XaXXon ( 202882 ) <xaxxon&gmail,com> on Tuesday May 02, 2006 @01:03AM (#15243164) Homepage
    Please don't forget that utorrent requires Windows to run.

    uTorrent is NOT self-contained. It requires the Windows API to run. This part of its footprint is not shown when you look at its memory usage, but that first 256MB of RAM that windows uses is the reason uTorrent looks so small.
  • by Anonymous Coward on Tuesday May 02, 2006 @01:08AM (#15243186)
    I am much happier with Sun's Java than most open source projects out there. It's very high quality. I know that I may offend some people, but I think it's higher quality than Linux (as an OS, not kernel). It's my opinion though. Sun managed to keep it standard is admirable. I think Sun also deserve to make money/own the property it created. Why not develop open source version of it instead of asking Sun to open source it? One answer I think is that Sun does not have enough resource to fix bug or bring out features quicker for something as large as Java. This is a good argument. I think it could be addressed differently than Open sourcing it. For example, manage the development better. Provide better incentive for users to submit bug fixes. Promote Java support service so that critical bugs a company needs to be fixed is fixed quicker (it's there, but maynot be promoted enough). I develop Java enough to know that it's very hard to have a perfect tool to test Java standard. For example, there's no clear spec for Gridbaglayout. What you see isn't enough to implement an exact replacement for what Java has. This is just a simple example to show that stardard is hard to make, hard to be changed quickly.

    This brings another point about Java standard. I remember JSF has many bugs that it tooks months to years to be fixed because the standard was broken. I think Sun needs to be much quicker than now to address these issue. These big problem should be fixed in a couple of weeks, or couple of months (2). Most people don't wait for a technology for a year or two to adopt it. They use alternative tech. This is usually a one way street and Sun will loose those customers.

  • by dubl-u ( 51156 ) * <2523987012&pota,to> on Tuesday May 02, 2006 @01:09AM (#15243188)
    What changes and how would depend upon which license was chosen.

    And equally on what community process is chosen.

    I regularly look at the source for some Java library class and cover my face in horror. I'm sure I'd submit a patch a week just in code cleanup and adding unit tests -- if I thought they would ever accept anything. An open license is only the start.
  • Re:This would help (Score:3, Insightful)

    by Billly Gates ( 198444 ) on Tuesday May 02, 2006 @01:09AM (#15243189) Journal
    mod up!

    Windows is loaded at startup as well as several services. Java initializes and caches its 100,000 methods in the JVM when a java applet starts which gives the appearance that its slow. However if you start a second app in java you will notice it will take ALOT LESS ram than if you just ran the second app seperately.

    This is because of the loading and caching of the JVM and most of the core dlls that windows apps use are loaded at startup. Its kind of an unfair comparison.

  • by the_womble ( 580291 ) on Tuesday May 02, 2006 @01:27AM (#15243256) Homepage Journal
    I assume it means that Sun is better off persuading language developers to run the "P" of the LAMP stack on the JVM (instead of their own byte-code interpreters), growing with LAMP rather than competing head-on with it and losing market share to it.

    If Sun is to do that, they should do it before Parrot and the language implementations for it are finished - so that gives them plenty of time.

    There are a already lot language implementations that already target the JVM [robert-tolksdorf.de], Sun would not lose by throwing a bit of money at OSS projects that might improve them and add a few more.
  • Re:This would help (Score:5, Insightful)

    by IntlHarvester ( 11985 ) on Tuesday May 02, 2006 @01:59AM (#15243362) Journal
    Problem with this argument is that almost nobody runs Windows just to use uTorrent, while quite a lot of people run Java just for Azureus. The resources required for Windows are used by all applications (*including Java*), but most desktop users only infrequently use Java apps.
  • Re:This would help (Score:2, Insightful)

    by k8to ( 9046 ) on Tuesday May 02, 2006 @02:00AM (#15243369) Homepage
    As for the second point, there _are_ other portable execution environments in the world, such as the python runtime, which do not have the same order of magnitude of memory fragmentation and very poor garbage collection that java tends to exhibit. Sun java has an amazing ability to lock hundreds of megabytes in core when very little is going on in the running application. It somehow manages to achieve nearly pathologically bad cases of memory use fragmentation and page faults to keep hundreds of megs allocated even under significant memory pressure.

    Even when writing the most boneheaded python code with extremely naive object creation strategies that end up hitting the VM ceiling, I never manage to lock more than a few tens of megabytes in real RAM. There are some types of applications which will tend to exhibit this type of pattern unavoidably, but the Sun JVM seems to maximize the potential for this poor condition.

    Many people point out that the cost goes down as you share the jvm across multiple applications. I have some reservations about the abandoning of memory space seperation between different servies, but practically speaking in many cases the intial hundred or hundred and fifty megs loss is simply too high to care about the much lower cost of the second java application. On a server where a box may be dedicated to a single task or set of tasks, throwing 2, 4, or more gigs at the problem may be totally reasonable. For ad-hoc tasks, desktop tasks, etc, it often a dealbreaker.
  • Re:Bad idea (Score:3, Insightful)

    by Brandybuck ( 704397 ) on Tuesday May 02, 2006 @02:07AM (#15243386) Homepage Journal
    As a FreeBSD user, I can see a huge advantage to open sourcing it. Until a couple of weeks ago, it was ILLEGAL to distribute a FreeBSD binary of Java. Before then it was necessary to get an register at Sun, download the source, and build it. Since building Java requires Java, it also meant one had to temporarily use a Linux Java to bootstrap a native Java. I don't know if you've ever built Java, but it takes a DAMN LONG TIME!

    But now there is *ONE* version of Java approved for *ONE* version of FreeBSD. Sigh.
  • Re:Bad idea (Score:2, Insightful)

    by goldsounds ( 787265 ) on Tuesday May 02, 2006 @02:23AM (#15243424) Homepage
    We understand the rational [sic] behind open source software. We just realize that not all of the software world needs to be (or indeed should be) open sourced.

    Absolutely. Nothing needs to be open-sourced, made free, at all, ever. There is no need for software freedom. It's just highly desirable, in much the same way as freedom of the press, the freedom to own property, the freedom to tear apart your car and turn it into a battlemech, the freedom to form a political party or the freedom to move about constant surveillance. Now, nobody is asking for legislation to require software freedom - despite attempts my major software and media players to legislate in the other direction. We are simply asking people to make a choice, instead of blindly accepting closed-source software as the most pragmatic solution.

    as far as your nausea at us pragmatists, without us, nothing would ever get done. Tell me - how's HURD coming along?

    Wow - zing. Ouch. You sure put me in my box. How's IIS coming along? How's Windows Vista coming along? How's IE coming along? To be honest, even if no free software project had ever been completed, ever, I would still be a free software advocate. People didn't found the free software movement because they'd discovered some kind of development-methodology magic bullet. They did it because they wanted to ensure that the users of software had more freedom, more choice, with the code that ran on their computers. And they decided to implement that vision whether or not it made software development any easier or more economically viable.

    Did you use MSN circa 1995? Before Microsoft was forced to embrace the web because open protocols running largely on free-software platforms threatened their dominance? It was a dull, closed, unimaginative world where you had to pay to play and everything went through Microsoft as the gatekeeper. Whenever I try to imagine a world without free software, that's what I imagine. You're welcome to it.

  • Re:Third-Party JVM (Score:5, Insightful)

    by LarsWestergren ( 9033 ) on Tuesday May 02, 2006 @02:26AM (#15243436) Homepage Journal
    The other main problem is Checked Exceptions, which force a programmer to write "try{" before the body of every method and "} catch (Exception e) {}"

    No, not EVERY method. Just methods that that can reasonably fail (for instance I/O related operations), and that doesn't "know" how to handle the problem themselves. This helps you create well defined APIs, which in my opinion is one major reason there are so many frameworks and open source projects for Java.

    Although relatively useless (if not harmful), these checked exceptions lead to a minimum of 122 extra CPU cycles per method invocation.

    Evidence of this? Besides, it has been said so many times, but appearently it has to be said again. Processing cycles keep getting cheaper. Programmer hours keep getting more expensive. Trading a few cycles for a feature that helps you create more stable and transparent code is sensible.

    catch (Exception e) {}

    That is just about the worst thing you can write. Ok, maybe catch(Throwable t) {} is worse. That the first editions of Bruce Eckels Thinking in Java books were littered with those is evidence he just doesn't get checked exceptions.
  • Re:This would help (Score:2, Insightful)

    by Anonymous Coward on Tuesday May 02, 2006 @03:12AM (#15243561)
    So, my quesion then is, where's the fat?

    Lets follow the logic here. We take 2 different sets of programmers, 2 completely different sets of designs and implementations, and by the way, because they are implemented using 2 different languages, this proves what exactly? Does the fact your competitors changed languages half-way through the project not give you a clue that competence might be a determining factor here?
  • by JanneM ( 7445 ) on Tuesday May 02, 2006 @03:12AM (#15243562) Homepage
    I call bullshit - just because you don't know how to set up your machine properly doesn't mean java has language problems.

    Great for you; I never got it to work properly (Ubuntu and SCIM/Anthy). I first had to add fonts to some java-specific list to get it to show CJK at all. When I run the app with Swedish locale it refuses to let me input Japanese (it does not listen to the SCIM server).

    I'm sure I could get it working with enough effort - but after one frustrating evening I'm not going to bother. Java isn't alone out there; just about every Java app has good equivalents without the hassle (including the Kanji app I was trying to use). And I'm certainly not going to be using Java to develop anything knowing that potential users will have go through the same mess I do.

    I should not have to "set up my machine properly" - most users do not have the technical skills to do so. I should be able to select "java" in the package manager (or rather, select the app I'm actually interested in) and it should all work - but it doesn't.

  • Re:Third-Party JVM (Score:3, Insightful)

    by mabinogi ( 74033 ) on Tuesday May 02, 2006 @03:21AM (#15243592) Homepage
    What the hell do your problems with the Eclipse UI have to do with Java?

    Basically, your reasons for disliking java come down to - it sometimes looks a little ugly, and some applications written in java have confusing (to you) UIs.
    The one you mention doesn't even use Swing - java's standard GUI. It uses a third party GUI library - IBM's SWT.

    There's hundreds of applications with confusing and horrible UIs written with many tools and in many languages. In fact, I would say that the number of applications with well thought out and intuitive UIs compared with the some total of all GUI applications over all toolkits and languages is vanishingly small. (Especially if your minor issues with Eclipse rate being "designed by the clinically insane" - I'd hate to think what you thought of Office 2000's disappearing menu items)

    You don't see people bashing C just because there exist crappy GTK+ applications do you? ...and on the ugliness issue - Most of the time that's laziness on the part of the developer. It is quite possible to develop a Java Swing application that looks perfectly fine, and does a pretty good job of blending in (better than some non java applications in fact). And Java 5 improves the situation even more. And if it's still not good enough, then use SWT - you can't even tell you're using a Java application when you're using an SWT application.
  • Re:This would help (Score:3, Insightful)

    by ultranova ( 717540 ) on Tuesday May 02, 2006 @03:29AM (#15243609)

    you are correct. but whatever we saved using java to get the project started, we have already spent trying to figure out why, oh, why java croaks on OutOfMemoryException when we have more than 8G of ram most of which is not being used.

    Because you forgot to give the JVM a permission to use that memory (with the "-Xmx8G" parameter) ?-) I hate it when that happens...

    on a more philosophical level, there is already an excellent VM that *can* use all the 8G and then some. it's called linux.

    Linux is a virtual machine ?-o And here I've thought all this time that it is an operating system kernel.

    using java to build apps because it's easy to program in is like using tonka trucks because those trucks are so much easier to handle than the real thing. after all, why pay commercial driver rates to drive a multi ton truck when you can get you own kids (for free) to 'drive' the tonka trucks.

    More to the point, using Java (or any garbage-collected mandatory bounds-checking language with no way for the programmer to overflow the buffers no matter how hard he tries) is like using a seatbelt rather than just trusting the driver not to crash the thing.

    i learned java back around '95, '96 and was really excited about it then. but after having used it on some really large projects, i have been really really disappointed and came to the conclusion that the only real contribution of the JVM was a serious neutering to most modern advances in the OS.

    Such as ?

  • by jadavis ( 473492 ) on Tuesday May 02, 2006 @03:42AM (#15243645)
    The P's and R (Ruby) are ran by an interpreter, which essentially interprets the text into machine language.

    That comment is misleading. The text is never translated to machine code. The interpreter reads the code and the interpreter does the work according to the rules of the language. Java takes an intermediate step and translates the code to bytecode, which can be more easily interpreted. However, so can python.

    Also, your performance analysis is lacking. Code size is a big factor here. A perl program may, in a few short lines of code, accomplish something that would take a lot more java code. If you have a complex text processing program, perl may well be much faster. That's because the few short lines of perl code call a lot of highly optimized C text processing routines. The java code may do more of the work in Java code.

    So, when evaluating the speed of a language, you should ask yourself: "Does parsing take a significant amount of time for my application?". Java may be fast, but if it doesn't call into the optimized C routines quickly enough, it's going to lose to players like perl, python, and ruby.
  • Re:This would help (Score:5, Insightful)

    by Anonymous Coward on Tuesday May 02, 2006 @03:49AM (#15243670)

    Programmer time is much more expensive than processor time these days. Therefore, many current programming languages are optimised to save programmer time first. C and C++ were designed in a time when processor cycles were extremely expensive, and therefore are optimised to save time at runtime instead.

    As you have seen, java typically gets you results more quickly than C. In this case, since you simply took less time to get to your basic functionality, you could take more time to think about how to code more efficiently, and ended up actually writing faster code in the end.

    However, java is not the only modern programming language out there. People have designed several new languages in the past decade. It seems reasonable to assume that some of those people deliberately set out to improve on java. Compared to such languages, java might appear to be very inefficient.

    I'll leave it up to you to compare and decide. For instance, here's a comparison for web applications, done at JPL. (YMMV):

    http://oodt.jpl.nasa.gov/better-web-app.mov [nasa.gov]
  • Re:This would help (Score:3, Insightful)

    by owlstead ( 636356 ) on Tuesday May 02, 2006 @05:02AM (#15243819)
    Azureus already uses SWT as underlying library, so this argument is a bit moot. SWT *is* using the underlying Windows functions for drawing. Nevertheless, Java will always use some more memory than a comparative (well written) C++ program, due to the class meta information that is included. You get a lot back in readability and in descriptive error messages, and several runtime advantages because of reflection (e.g. plugins). You need C# with .NET to get the same in a Windows only environment, and I wonder if such a program compares favourably.
  • Re:No (Score:5, Insightful)

    by Cederic ( 9623 ) on Tuesday May 02, 2006 @05:07AM (#15243831) Journal

    Sorry, but when I'm dealing with code written offshore by developers of mixed ability in a system integrating my mainframe to my fulfilment systems with customer web access, online payments, content management and back office consolidation thrown in then I want a language that's immediately readable.

    Perl is exceedingly brief to write. It's also very difficult to read.
    PHP/Python are better, but most code I see is frankly horrible.

    With Java the APIs and libraries - even third party, even open source - have descriptive names. They make sense. You can figure out what's going on from the method and classnames, without having to go and read them.

    This makes unfamiliar code easier to read. I've done Delphi/C/C++/perl/PHP programming, and none of them have as easy to read code as Java. I value that a lot.

    That you have to type an extra 32 characters to open a file? Good! Hell, you're not typing enough already - 'in' is a bad name for a variable. How about making it descriptive, tell the reader what you're reading.

    Modern IDEs do most of the typing for you. The clarity of the code that's written is more important than the extra two seconds you need to write it.

  • Re:No (Score:5, Insightful)

    by shish ( 588640 ) on Tuesday May 02, 2006 @05:13AM (#15243849) Homepage
    Why do none of your other language examples have an explicit buffer layer? You should add that, then see what the result is :P People in other languages have become used to reading chunks of a file into a buffer then parsing a bit, then reading a new chunk -- java people can just read what they want, when they want; IMHO adding a bufferedreader is a small price to pay to get rid of all the manual buffering~

    While you're at it, make it read objects from a gzip compressed network stream:

    new ObjectReader(new GZipReader(new SocketReader(new Socket("1.2.3.4", 42))));

    (I'd really like someone to demonstrate this in other languages; having started with java and moved to C, things like gzip stream reading and network access seem like such unnecessary pains in the ass that I've never bothered to learn them properly...)

  • Re:This would help (Score:3, Insightful)

    by shutdown -p now ( 807394 ) on Tuesday May 02, 2006 @05:35AM (#15243896) Journal
    Who cares how many projects are written in it, if it works better for you and does the job?
  • by CountBrass ( 590228 ) on Tuesday May 02, 2006 @05:51AM (#15243934)
    I diagree. Java is far to bloated and complicated. I've been using it since it first came out and I balk at the vast array of libraries you need to use or choose between to get anything done. I feel really sorry for anyone coming to it for the first time.

    Personally I use Ruby (on Rails) these days for web development: convention over configuration is, imo, a much more important advance in the art than object-orientation was.

  • Re:Bad idea (Score:4, Insightful)

    by dubl-u ( 51156 ) * <2523987012&pota,to> on Tuesday May 02, 2006 @06:14AM (#15243969)
    You can't write Ruby on Rails in Java? Oh. Best tell these guys: https://trails.dev.java.net/ [java.net] Enterprise developers deal with inadequacies in Java by doing what everyone else does: Writing their way around it. This is where struts, hibernate, ant, junit came from.

    I'm sure the Trails guys will be the first to admit that Trails (like peers RIFE, Sails, and Stripes) is not as simple as Rails is. We Java developers are used to looking past the 30 lines of getter/setter boilerplate and other mysterious Java incantations. But that's not true for a lot of devs.

    Both Struts and Hibernate prove my point in different ways. Struts gets around Java's limitations with reams of XML, a cure frequently worse than the disease. Hibernate is closer to the spirit of RoR, but that's not really Java either; they have to do heavy wizardry with bytecode manipulation and dynamic subclassing because Java doesn't give them the necessary power. And note that Hibernate came from outside Sun. Sun's attempt at the same the same thing was EJB, which has been deservedly, if belatedly, shot in the head.

    As a senior technical person in a large enterprise I too seek the holy grail of letting business people enter their business processes into a pretty front-end and getting a fully featured website with full supply chain integration automatically generated.

    Actually, that's not what I seek at all. I believe that software development is inherently complex; you can't ever automate the thinking away. What you can do is give the developer tools to aid their productivity, to make simple things easy and dangerous things hard. Let them focus their brainpower on the things that are actually worthy tasks.

    For a data driven system, it's great. For a complex system integrating with multiple other systems, it's no easier to use.

    Exactly. At the low end, it's easier; at the high end, it's the same (or perhaps a little worse). But what Sun is missing is the idea that development need not always be hard. Pehaps they'll learn that from Hibernate, which comes from an attitude very like RoR. If not, I hope they learn it from Rails.

    And because it does so much magic under the skin, if that magic doesn't meet your needs, you struggle more to change it.

    I agree completely. This is where I'm waiting to see how the RoR and Ruby communities mature. They've got the entry-level system taken care of, but can they provide a path to complex systems without the kinds of complexity cliffs that you see amateurs using Access or VB run smack into? I think that Ruby the language has horsepower that other easy-to-use tools don't, but we'll see if they can turn that potential into actual results.
  • by afd8856 ( 700296 ) on Tuesday May 02, 2006 @06:29AM (#15243998) Homepage
    You may not realize, but "libraries are the new language". Seriousely, what good is a cool language if you have to reinvent the wheel everytime you want to have something like a report printer with print preview - a bit upset on python, with which I'm fighting right now to get something nice for a business app, I would really like something like jasper reports for python. Drawing on the DC with wx sucks for more then one form, and using reportlab to generate pdfs sucks as well. I've settled on doing a mono-platform hack, generating html with simpletal and calling its print preview dialog through ActiveX.
  • Re:Bad idea (Score:4, Insightful)

    by killjoe ( 766577 ) on Tuesday May 02, 2006 @06:48AM (#15244029)
    "Tough shit. Want a free Java? Write one yourself. Want Sun to give you one? Explain to them in their terms why they should."

    Because open source languages such as php, perl, python, ruby and C# are eating into your market share every day. People have already abandoned java for most web applications and it never even got off the ground on the desktop.

    Finally Sun does not make any money off of java. They have said so themselves.
  • by welshie ( 796807 ) on Tuesday May 02, 2006 @06:54AM (#15244038)
    Like Sun do with the various flavours of the JDK.

    I have on my machine at least four versions of Sun's Java runtime. I need at least four versions to run the various Java applications that I need. This is because Sun keep deprecating and eventually breaking API calls that were previously in favour.

    Some will only run on 1.1.3
    Some will only run on 1.3.1
    Some will only run on 1.3.2
    Some will only run on 1.5

    Write once, run anywhere, yeah right.
  • convention over configuration is, imo, a much more important advance in the art than object-orientation was.

    Convention over configuration is just another name for having sensible defaults, and nothing stops you from using that in Java. Indeed most Java frameworks have already added (or are working on) this.
  • by flithm ( 756019 ) on Tuesday May 02, 2006 @07:36AM (#15244148) Homepage
    Fact: Java apps will ALWAYS use MUCH more memory than programs written in compiled code (whether it be C, C++, VB, Delphi, etc) due to the fact that it's interpretted (ie not byte code compiled). It has nothing to do with "class meta information," which can actually be higher in some other languages. Oh and the java reflection API is much more useful than for plugins (which you can easily do in C / C++ as well).

    Even byte code compiled java (ie gcj) is much more memory hungry than a compiled C / C++ app, and it shouldn't be any surprise. The Java API is quite vast and interdependant, so even using small portions of it leaves a large footprint.

    I don't see why it's a bad thing either. People who argue about one language over another just aren't knowledgeable enough. Each language is a tool, and is suited for particular tasks. Trying to use one language all the time is analogous to trying to use a hammer for all carpentry tasks. Java is a good language for certain things, not so good for others.
  • AMD64 (Score:4, Insightful)

    by SIGBUS ( 8236 ) on Tuesday May 02, 2006 @08:34AM (#15244360) Homepage
    Maybe we'll finally see an AMD64 Java plugin [java.com] for Firefox.
  • by djg1977 ( 909867 ) on Tuesday May 02, 2006 @09:11AM (#15244542) Homepage
    I might be mistaken here, but isn't "open sourcing Java" meaningless?
    Java is an open standard already.

    What I believe is being discussed, is whether Sun should open source their Java Virtual Machine (JVM) - Sun's implementation of the Java standard.
  • by RPoet ( 20693 ) on Tuesday May 02, 2006 @09:22AM (#15244598) Journal
    I might be mistaken here, but isn't "open sourcing Java" meaningless?
    Java is an open standard already.


    Since when is open source and open standards the same? And does the JSR constitute an open standards body? (Yes, to some degree, but it's not perfect)

    Sun should liberate the "hard" parts. We already have good compilers and mostly good JVMs; what we need is the class libraries, and to a smaller extent the tools. Come on, Sun.
  • Re:This would help (Score:3, Insightful)

    by k8to ( 9046 ) on Tuesday May 02, 2006 @09:35AM (#15244660) Homepage
    Why are you arguing as if I stated that java uses more memory than C? Has downsides, sure, but the point is that Java is _the most memory hungry language in the entire world_.

    You can go look at language shootouts showing example code and note how java always allocates the most memory. You can look at real world server applications (tomcat vs medus vs apache) or real world client applications (bittorrent vs rufus vs azureus). You will find that java is always using way more memory than the competition.

    Java uses more memory than C.
    Java uses more memory than C++.
    Java uses more memory than Common Lisp.
    Java uses more memory than Smalltalk.
    Java uses more memory than Self.
    Java uses more memory than Erlang.
    Java uses more memory than Icon.
    Java uses more memory than Pascal.
    Java uses more memory than Simula.
    Java uses more memory than Python.
    Java uses more memory than BCPL.
    Java uses more memory than Perl.
    Java uses more memory than TCL.
    Java uses more memory than Haskell.
    Java uses more memory than Ocaml.
    Java uses more memory than javascript.

    There is _no_ common denomonator to these languages. Some have virtual machines as sophisticated as the jvm. Some have simple hand-hacked runtimes. Some are compiled. Some have features and dynamicism Java cannot hope to touch. Some are terse. Some are verbose. Some are forgotten and old. Some are quite new. Java uses more memory than every single one, and that is a major weakness of java in practical terms at this time.
  • rank amateurs (Score:4, Insightful)

    by mikaelhg ( 47691 ) on Tuesday May 02, 2006 @09:42AM (#15244721)
    why, oh, why java croaks on OutOfMemoryException when we have more than 8G of ram most of which is not being used

    Because you are rank amateurs who are unable to read documents or use profiling tools such as jconsole or YourKit [yourkit.com]?

  • One commentator said, "Sun should endorse PHP and go one step forward and make sure the 'P' languages run great on the JVM [Java virtual machine] by open-sourcing Java.


    You are free to write a PHP Interpreter which is Open Source and runs on a JVM ... Jython shows this for Python.

    I frankly don't know if it benefits me, or anyone, if Java is OSS. However it would be horrible if we face what we currently have with C++, litterally hundrets of compilers where everyone implements his favorite subset of the language definition.

    angel'o'sphere
  • by cheezit ( 133765 ) on Tuesday May 02, 2006 @11:47AM (#15245921) Homepage
    Interesting...I've had the opposite experience. I spent time in the MS camp where there are a wealth of 'VB for dummies" books but everything beyond that comes from Microsoft itself, and you better have a MSDN subscription. With Java it seems there are tons of free online resources for specific questions, and there are also some very good books like "Thinking in Java" (perhaps a bit dated now) that get the beginner to the point of understanding all the basics, without being condescending the way, for instance, MSDN so often is.

    Then again, given the languages you list Java may not be useful for what you do. If it might be, though, I'd give it another try...
  • Re:This would help (Score:4, Insightful)

    by Decaff ( 42676 ) on Tuesday May 02, 2006 @01:48PM (#15247102)
    There is _no_ common denomonator to these languages. Some have virtual machines as sophisticated as the jvm. Some have simple hand-hacked runtimes. Some are compiled. Some have features and dynamicism Java cannot hope to touch. Some are terse. Some are verbose. Some are forgotten and old. Some are quite new. Java uses more memory than every single one, and that is a major weakness of java in practical terms at this time.

    I know. This is a real weakness in Java. It would have been great if it was a far more memory efficient languages, because then it could have been used in a wide range of low-memory situations like embedded devices, PDAs or mobile phones....

    Er - something wrong with this argument, perhaps?
  • by namekuseijin ( 604504 ) on Tuesday May 02, 2006 @02:46PM (#15247685)
    hi again! ;)

    "Having a rich and versatile range of libraries is a problem?"

    nope. the problem is when you have a poor enough language without support for high level constructs and has to do literally anything with libraries. it's just a lot more tiresome than builtin language support...

    "Convention over configuration is nothing new."

    yeah, shame it's not used more often in the java world rather than the XML craze...
  • by pebs ( 654334 ) on Tuesday May 02, 2006 @11:54PM (#15251282) Homepage
    You hit it precisely on the head. Linux and Java proponents tend to have a particular problem with being unsympathetic to n00bs

    Unlike Linux, Java is very well documented, so having to interact with a community is not necessary to learn and use it (the language itself). There's plenty of books, as well as courses you can take (since it is so mainstream).

    Once you start using 3rd party libraries and tools, then you might need to interact with the community. Just like any large online community dealing with tech, there's always a few assholes and elitists (it's people on the Internet, what do you expect?). If that's enough to push you away from a particular technology, you might as well give up on anything that requires interaction with people.
  • by pebs ( 654334 ) on Wednesday May 03, 2006 @07:07PM (#15258266) Homepage
    So basically, random individuals on the Internet (who had no connection to Sun I assume) made you lose interest in a programming language. I can understand if the developers of a product are pricks and that turns you off of a product, but I'm sick of hearing "I don't use it because people told me 'RTFM' or 'Google'". That happens everywhere on the Internet. That's what anonymous/semi-anonymous non-face-to-face communication does to people. Get over it.

    So I take it you don't use Linux either because some big, bad forum jerks told you "RTFM" too?

The hardest part of climbing the ladder of success is getting through the crowd at the bottom.

Working...