Slashdot Mirror


The "Return" of Java Discussed

An anonymous reader writes "Following on from the marvelous recent James Gosling interview highlighted in Slashdot last week, it would seem that a renewed momentum is building up for his cross-platform creation, if this editorial is anything to go by. It's called 'Java is Back!' But did it ever go anywhere?"

26 of 558 comments (clear)

  1. There has been some good alternatives by after · · Score: 3, Insightful

    wxWidgets (my favorite) and wx.NET
    Mono
    Cocoa# and Gtk# (recentely kn /.) .NET

    Java is slow, obeist, and heavy.

    1. Re:There has been some good alternatives by LizardKing · · Score: 4, Insightful

      But how many companies do you see requiruing wxWidgets experience? Not to knock it as a cross platform development toolkit, but rightly or wrongly it's overlooked by virtually every company I've ever worked at. The exception is my current employer, where it was evaluate along with Qt and Java as a means to write cross platform GUIs. Java won, as C++ proved far too troublesome on a previous project.

      .NET is actually a back handed compliment to Java. Java was so good that MicroSoft had to clone it. With Mono now at version 1.0, then perhaps C# is in a position to threaten Javas cross platform crown, although perhaps not without Windows Forms support.

    2. Re:There has been some good alternatives by Anonymous Coward · · Score: 4, Insightful

      Yawn. The 'Java is slow, obese and heavy' arguments are poor, out of date and largely inaccurate. Java's popularity on mobile phones suggests it is hardly a performance bottleneck, nor is it too demanding for memory.

      When Java first came out, a large number of 'web hackers' and inexperienced programmers flocked to the language and produced applications that were often very weak. The easy access to such a flexible toolkit encouraged first time coders to undertake projects beyond their skills. Even experienced teams of developers found it took a while to get to grips with the issues involved in the new environment. The result was the inevitable disillusionment following the hype. Expect C# to go through a similar slump as people realise it doesn't solve all your problems.

      However, Sun have done a stunning job in evolving Java, and developers who have taken the time to understand it have been producing impressive software for some time now. The latest version is powerful, fast and addresses an enormous range of requirements that make developing software very much more efficient.

      There will be a lot more about Java in the news this year. Tools are being developed for everything from screensavers to MMORPGs, so why not take a second look before rehashing old predjudices?

    3. Re:There has been some good alternatives by redsolo · · Score: 5, Insightful

      Im amazed that MS (or other firms) have managed to let these rumors become facts. Java is not slow, at my last job we created an image viewer for professional photographers which was running on Java. The system had no problem showing 2000 thumbs (not at the same time, but scrolling was instant), zooming into 10mbs images was a breeze, you could play with the mouse buttons and it would instantly zoom to the 1:1 layer and back again. And this is something that Java has been known to be very bad with GUI and images. But we managed to pull it of anyway, and it was even quicker than the defacto industry standard application, which was written in C++.

      So, please dont come with those crap arguments, because they are not true.

      But what is true; c++ will always be faster than java, .Net might be (but thats because of the infamous shortcuts than only MS ppl know of). But is that the really point, when you are creating desktop applications? If you want speed, try develop a desktop app in Assembler. Now it will be the fastest around, but probably look like crap.

      What must be really annoying, is that .NET has borrowed so many classes from Java so they should call it J--.

  2. Return of Java by LizardKing · · Score: 5, Insightful

    It's strange how so many people say "Java is dying" or now that it patently isn't, they're saying "Java's back". If you go to any of the recruitment websites in the UK, the most popular requirement is Java Enterprise experience, hardly the mark of a development system that's been in decline ... The only explanations for this misrepresentation of Java that I encounter on sites like Slashdot and Linux Today is the following:

    • A large part of the readership are students, and therefore don't really know what's going on in the software industry.
    • The prepondereance of GNU fanboys means that Java gets dissed for not being Free(tm).

    Discuss ...

    1. Re:Return of Java by Tim+C · · Score: 4, Insightful
      You forgot a couple:
      • despite entry level PCs now having specs along the lines of 2.5GHz processor and 256MB of RAM, lots of people on such sites are obssessed with perceived bloat
      • lots of (but by no means all) people dissing Java are actually sysadmins, rather than programmers, and do all of the coding that they do do in perl, shell script, and similar
      It always amuses me when I read "Java is teh suck because it's so slow and bloated!" comments. I've been doing server-side Java development for a little over 4 years now, and we've never had a performance problem. I use a number of client-side Java apps everyday, too, and they're perfectly responsive and usable. Sure, the same thing written in C or C++ probably would be faster - but when you literally can't tell the difference, who cares? A modern PC spends almost all its time waiting on user input or IO bound anyway.
    2. Re:Return of Java by LarsWestergren · · Score: 4, Insightful

      It's strange how so many people say "Java is dying" or now that it patently isn't, they're saying "Java's back".

      I think a lot of the people who keep saying that Java is dying say it because they wish it was true.

      And of course, if you keep repeating a lie often enough, the sheep begin to believe it. Just like on CNN, turn it on and watch a "reporter" frown in mock gravitas and ask things like "A lot of people are saying that the Kerry campaign is floundering and the Democrats are beginning to feel desperate, we ask the experts 'can anything be done, or is it already too late?'"

      No one had said any of those things, but since CNN keeps saying that people say it, it becomes truth...

      --

      Being bitter is drinking poison and hoping someone else will die

    3. Re:Return of Java by 16K+Ram+Pack · · Score: 3, Insightful
      Often, bloat just doesn't matter. It's something I wish most programmers would learn. Code has to run as fast as the job needs it to.

      To generalise, a main functions of an online system needs to be optimised. But things like offline processing often doesn't. Higher priorities are maintainable and reliable code.

      And what you say is right about IO. When I used to work on mainframes, our senior tech guy used to tell us to not worry about the code speed except for IO. PCs are heading that way.

    4. Re:Return of Java by ph1ll · · Score: 4, Insightful
      I just started working at a company where user Web sessions in Orion were reaching 1 MB each.

      Further investigation revealed that the code sucked. It was nothing to do with Java. A re-write brought the Web sessions down to about 100 bytes each. It is now a happy app.

      Moral of the story: there is good code and bad code in any language.

      (Having said that, the JVM does take an awfully long time to bootstrap...)

      :-P

      --
      --- "We've always been at war with Eastasia."
    5. Re:Return of Java by mcbevin · · Score: 3, Insightful

      For a long running enterprise application, it would probably be SLOWER in c/c++. No matter how good you are at programming c/c++ you can't anticipate every little bottleneck and write it in perfect assembler... but the hotspot compiler can do that rathar well.

      Sounds nice in theory. In practice for most Java enterprise applications the memory usage is by far the biggest bottleneck. The hotspot compiler can't change this.

      For example, I did a fair few speed tests working with strings in Java. For example, comparing various search and replace algorithms. The entire difference between the faster algorithms and the slower ones was how they handled the memory usage.

      Strings are only a simple construct, but even with these Java is horribly inefficient unless great care is taken by the programmer to use them efficiently. In contrast, when programming C++ I can use strings paying scant regard to efficiency and know my code will virtually always be faster than any Java program doing the same thing.

  3. Request for interview by Anonymous Coward · · Score: 5, Insightful


    Do a user driven (10 questions, you know) with James Gosling. Java/Sun takes a lot of flak these days, it would be genuinely interesting to get Gosling respond to some good questions.

  4. Move along, nothing to see here.. by CountBrass · · Score: 4, Insightful

    Seriously, this was a 100% fluff article. The foundation for the article was based entirely on the assertion that a Google for "Java" brought back far fewer hits than "NET": well no shit Sherlock- perhaps if you'd tried ".NET" instead?

    The major problem Java has is EJBs: everyone in Java-land seems to think that their problem requires solving using this pile of crap. A web application with persistence- ooh we'd better use EJBs then!

    A secondary issue for Java is the barrier to entry is extremely high: sure you can learn the language quickly but it's Java's libraries that add the real value. And there are an awful lot of them. I've been using Java for 10 years (yeah I developed using the AWT and cursed it every day: if it hadn't been for the AWT being so awful I'd never have thought Swing was any good). Anyway, I've been using Java for 10 years and I would hate to have to learn it from scratch today.

    --
    Bad analogies are like waxing a monkey with a rainbow.
  5. Source critique by Kingpin · · Score: 4, Insightful


    One of the first things I was taught in college, was to be critic of the sources I based research on.

    In the world of WWW, it seems that each and every article and blog entry can be used as reliable fact. "He wrote it, it must be true". If some nerd posts that language X is the best, and those who use it are really really smart (case in point Paul Graham/Pythong) - that really doesn't make it come true. Same goes for Java "dead or alive" etc. etc. (Naturally, we all know that BSD is in fact dying - this is the exception).

    --
    Unable to read configuration file '/bigassraid/htdig//conf/14229.conf'
    Geocrawler error message.
  6. Keyword being: Enterprise by Moraelin · · Score: 3, Insightful

    Java is pretty popular on the server side, but client side it was always one monumental flop.

    As applets go, for example, nowadays the whole program-inna-browser market is owned by Flash, followed by ActiveX. And for good reasons.

    Starting with the fact that Java 1.0 was indeed a slow piece of crap for anything but the most trivial applets. Try displaying a complex table without a JIT, and you were talking about response times you could measure with a stopwatch, not with System.currentTimeMillis().

    The initial lack of support for packing everything in a jar didn't help that cause either. Downloading 50 classes as separate files isn't particularly fast. And that's a very small project.

    And for all the multi-platform hype, wasn't particularly portable either. If you tried running even a trivial AWT applet on different platforms, you wouldn't even get the same events. Or for something which required you to give a size in pixels on the web site, you wouldn't even get the same font sizes.

    And by the time it caught up... meh. Flash is _still_ the better choice.

    Not the least because of download size. Sun now includes all the crap they could think of as standard libraries. Do I need an XML parser to make a simple game applet? Not really, but Sun wants my users to download that crap anyway.

    (No, it's not a made up problem. I've had modem users tell me literally "whoa, I'm on dialup. Is there some smaller version I can download?")

    That's just a small slice of the many ways in which Sun started it on the wrong foot.

    --
    A polar bear is a cartesian bear after a coordinate transform.
    1. Re:Keyword being: Enterprise by Azghoul · · Score: 3, Insightful

      Good to see your slowing moving back down the mod chart... "Client side... was always one monumental flop" is pure myth. It's interesting that you seem to think "client side" means "in a browser window".

      Run Eclipse sometime.

    2. Re:Keyword being: Enterprise by Moraelin · · Score: 3, Insightful

      What did you want me to do? Write a whole tome worth of everything that ever was wrong with Java client side? I did say "That's just a small slice of the many ways in which Sun started it on the wrong foot."

      Believe it or not, I've been in client side application projects. I also have Eclipse open right now.

      In fact, Eclipse is the prime example of how Sun started on the wrong foot. SWT (the widget set used by Eclipse) is IBM's work, while AWT and Swing are what Sun had in mind. The words "dumb and dumber" come to mind, when I think about AWT and Swing.

      Want one thing that an actual client complained about? We had to program the same very small app in C _and_ Java, on Windows, Linux _and_ MacOS. Well, the whole package were more apps, but this was the only part which had to run on all desktops.

      The client's first comment? "Whoa! Why does the Java version need 16 MB of RAM, when the C one is less than 1 MB?"

      Another project was a bigger Swing "thick client" database program. In Swing. You know what the first complaint was? The look and feel. Inconsistent fonts, inconsistent keyboard shortcuts, etc. Sun's "Windows" Look and Feel is a sick joke. We ended up doing more work to write our own look and feel, just to get the program to look like a native app.

      Yet another way in which SWT got it right, while Sun screwed up.

      The second complaint? Performance and memory use. 'Nuff said.

      Also, believe it or not, bigger companies have tried moving to Java on the desktop. It was every company's wet dream to suddenly only have to maintain one version, and work on every single OS. Some of which they didn't even support before. Everyone tried it.

      E.g., Corel at one point wanted to move their whole office packet to Java.

      Why do you think Microsoft got so scared and wanted to kill Java? Precisely because of this. It looked like all of a sudden everything will be multi-platform, and the "but this and that runs only under Windows" advantage will evaporate over night.

      What happened to all those projects? They flopped. They ended up slow, bloated and more unstable than their Windows counterparts. So everyone moved back to C/C++.

      If that doesn't count as a monumental flop, I don't know what does.

      --
      A polar bear is a cartesian bear after a coordinate transform.
  7. It went to million servers and clients by struberg · · Score: 4, Insightful

    and thats not bad.
    Consider, that java is not only the language itself, but also the whole environment!

    And thats the real big difference to mono. Java may run on any Computer since 92' till 2050, without need to take care of what Microsoft will change in 2 years.

  8. This writer is into amateurish journalism by nysus · · Score: 4, Insightful

    He bases part of his argument that Java is less popular than .NET by doing a Google fight between "java" and "net"???

    Java can be a coffee or an island in the Indonesia. Net is a device to ensnare animals and is a verb as well.

    And he cites a blog item from a Sun executive as proof that Java is back? Please. The article is nonsensical.

    --

    ---Technology will liberate us if it doesn't enslave us first.

  9. Re:And for anybody who doesn't believe... by groomed · · Score: 4, Insightful

    Well, you must be pretty hopeless not to be able to install the Java runtime. Last time I installed it on Windows, it took half a dozen mouse clicks and a couple of minutes tops.

    Everything is easy when you approach it from the point of view that it doesn't actually have to work.

    There are many versions of the Java environment, from different vendors, all with subtly different behaviors and ways of integrating into the environment. Not to mention that the user may be running other Java applications which depend on a particular version of the Java environment, which further complicates matters. This makes it a pain if you want to deliver an application to the user with minimal hassle.

    Or, you can just mandate that the user run such-and-such version of the Java enviroment on such-and-such platform, but then you lose a large part of the write-once, run-everywhere appeal.

    I run Java on very low spec embedded PC's, and it's no slouch there. Even if there is a couple of seconds wait at startup, the JIT compiler means a well written app will run without being appreciably slower than a "native" app once the JVM is bootstrapped.

    Java's "slowness" has at least three components: startup time, garbage collection delays, and the huge footprint which triggers swap activity.

    For server applications, none of these matter much. For interactive client applications, these factors conspire to make Java apps look very bad when compared to "native" competitors. The exception here are applications like Eclipse, which you start when you get in from work and don't quit until you're done. But for most other apps, e.g. utility apps which you just want to quickly use and close, or workflows where you switch between multiple apps frequently, Java is just not suited.

    Very rarely do we have to resort to doing major grunt work on the server as opposed to doing it in the Java client.

    You're missing the point royally. Java isn't slow at doing grunt work. Few people would contest that. But as a platform to write desktop applications, it is a pig. The Swing UI is slow and prone to memory leaks, data interchange facilities are poor (even the clipboard functionality integrates poorly with the surrounding environment), memory requirements are completely uncontrollable.

    Yes, Java does requisition a lot of memeory when an untweaked JVM starts up, but the inmpact depends on the machine running the program.

    Indeed, and that's why most Java shops pretty much only run one application on their servers.

    This could be rephraed as "bad Java programmers leak memory".

    The fundamental problem is that you cannot control how memory gets used. For example: the JVM allocates memory from the underlying OS in chunks which it then doles out to your app as necessary. Then at garbage collection time, the memory is reclaimed from your app and returned to the JVM. But then the JVM may or may not ever return this memory to the underlying OS. This means that even if you have a tiny application, when the user opens a mammoth 100MB document just once, the application will continue using 100MB even after the user has closed the document.

    Yes, this is sort of tunable through commandline options and other properties, but then only for some versions of some implementations of the JVM. Which brings us back to the first point, that it's a hassle to deliver hassle-free Java applications. It's so troublesome in fact that some programmers choose to simply distribute a JVM along with their apps.

    The bottomline is this: Java is a cool language, but it just doesn't play nice with others. It insists on reinventing everything, it insists on abstracting everything, and it insists on total control over the environment. That's fine for in-house apps or web apps, but it limits Java's adoption on the desktop.

    And ultimately, I think it condemns Java to a perpetual "behind the scenes" existance, growing ever more baroque appendages in its invisible niche, until its burdensome legacy is swept away by something more open.

  10. Re:And for anybody who doesn't believe... by RAMMS+EIN · · Score: 4, Insightful

    I am almost at the point that I'll promise not to engage in this discussion again. Ok, one more time:

    ``Well, you must be pretty hopeless not to be able to install the Java runtime. Last time I installed it on Windows, it took half a dozen mouse clicks and a couple of minutes tops.''

    And a 20 MB download that takes dog knows how many megabytes after installation. Also, the whole process will have to be repeated at the next release, as chances are software developed on a newer version won't run on an older one.

    ``Even if there is a couple of seconds wait at startup, the JIT compiler means a well written app will run without being appreciably slower than a "native" app once the JVM is bootstrapped.''

    Most applications don't need a lot of speed once up and running, anyway. Startup time is a huge annoyance, to me anyway. Is it really that hard to save the compiled code, so next time the JIT doesn't have to work again?

    ``java applications have slow, unresponsive user interfaces--- on slower machines, using java-based user interfaces can be frustrating (resizing the application window can mean taking a coffee break).

    That's strange, it must be their inability to code an interface and data models in an efficient manner.''

    I don't know about your systems, but on any system I have used in the past years, user interfaces in Java apps are noticeably more sluggish than in native ones. Perhaps this is perceived performance, but arguably it's the perceived performance that matters for user interfaces.

    ``java applications leak memory

    This could be rephraed as "bad Java programmers leak memory".''

    Yes, but isn't it symptomatic of defects in the language if many programs written in it leak memory? Besides, isn't Java's garbage collection supposed to take care of things? Personally, I believe that there was an issue with old JVMs (at least on Linux) leaking memory, that has now been solved. At any rate, I think that kast's author is being more bitter than rational when he says things might be better without gc. Gc is a Good Thing, after all, memory allocation and deallocation is excactly the sort of task that machines are good at and humans are not. It can even speed up programs under some circumstances.

    --
    Please correct me if I got my facts wrong.
  11. Re:As is the case with most languages.. by CountBrass · · Score: 3, Insightful

    You know, I can't remember the last time I was asked to deliver a product that printed "Hello World" so whether or not the JVM is too heavyweight for such an app' is moot. And even if it was: throw more hardware at it. Hardware is cheap. Maintaining code is expensive and C++ has a much higher maintenance overhead than Java does (pointers, object ownership, misused multiple inheritance - the list goes on).

    --
    Bad analogies are like waxing a monkey with a rainbow.
  12. Re:And for anybody who doesn't believe... by isdfnmo · · Score: 3, Insightful

    Well, you must be pretty hopeless not to be able to install the Java runtime. Last time I installed it on Windows, it took half a dozen mouse clicks and a couple of minutes tops.

    That is SO not the point. Why the hell should a, for example, 55 year old occasional computer user need to even know WHAT Java is, let alone UNDERSTAND why they need to install it?
    Surely the uppermost aim for any software engineer / developer / designer is to hide complexity from the user?
    I have two roles at my work: the first is as an IT Project Manager and the second is in a Procurement role for 3rd-party software development effort (i.e. a Client). If the technical-lead on a project or a supplier ever told me that "all the user needs to do" is to "just" download and install anything (including Java) to run their application I would throw them out the door / off the project!
    This is as absurd as priming your fuel pump everytime you want to drive somewhere, or calibrating your derailleur gears before you can use your bicycle.

    Not acceptable!!

    --
    quidquid latine dictum sit altum viditur
  13. Monkey by Graymalkin · · Score: 4, Insightful

    I find it amusing that Java is dying because it hasn't totally supplanted Win32 as a desktop application environment. More and more I'm seeing companies replacing their aging in-house applications with Java web services. Where several years ago an internal application might be a VB5 front-end to an Access database today is likely a full fledged web service running on a central server. Such applications are available over a VPN, dial-in modems, or even bridged networks with little trouble. The data is also centralized meaning there's no synch issues within the office. When Mary updates a record Sam gets that information immediately. These applications are also client agnostic so they'll run on just about anything with a web browser.

    Centralized web services are capturing the hearts and minds of a lot of companies anymore. Clients for such services can be thin or fat and can run whatever OS is practical. An office full of iMacs can access a web service just as well as an office full of HPs running Linux. If Java is ditched down the road for Perl or Python the database server isn't going to go tits up.

    Java's death never really happened, it's just that its success came from an area no one really expected early on. Perl's met with similar success. What started off as a language to parse server logs and turn huge data files into meaningful information became the premiere CGI language on the web. While a successful word processor might never be written in Java, the language and environment are far from dead.

    --
    I'm a loner Dottie, a Rebel.
  14. Re:The Reason Java 'appears' slow, by argent · · Score: 3, Insightful

    Java's got a lot of problems in the standard class libraries and type model. When I started working on it I found the lack of dynamic types and the inconsistent classes are a big problem: I wanted to write wrapper classes around everything just so I could get the bookkeeping out of my hair. Apple's Objective C class libraries (Cocoa) have the same problem to a certain extent, even with dynamic types to help.

    I'm not sure that MVC is the problem, though. It's been widely used in a variety of systems since the late '70s on processors that aren't even pocket-calculator quality today. The Smalltalk I played with in 1982 was running on a Dorado that must have managed all of a million instructions per second, and my NextStation (however that's supposed to be capitalised) has a very responsive GUI on a 68030... it actually feels faster than OS X on a G3/400. Java's implementation of MVC may be particularly bad, but the inherent overhead in the design can't be that great if machines as anemic as these can manage it well.

    I would put the responsibility for Aqua's performance squarely on the shoulders of Quartz. Quartz is a high quality rendering engine, but to get decent performance out of it you need a good video subsystem and enormous amounts of memory to copy and composite the high resolution pre-rendered bitmaps... not to mention enough processor time to do print-quality rendering in the first place. I expect that Microsoft's next generation video subsystem will be equally aggressive.

  15. Re:And for anybody who doesn't believe... by sbrown123 · · Score: 5, Insightful


    I find it utterly hilarious that people say that Swing proves Java is fast, because the really fast parts aren't written in Java.


    Swing is called a light-weight gui since it has no native peers. This means there are no native widgets in otherwords. Whoever said Swing is fast?

    Azurues uses SWT. SWT is not Swing. SWT uses native widgets. SWT is generally faster than swing because of this.

    BUT what people dont get is why Swing exists. SWT, although faster, operates differently on different platforms and looks different. Windows widgets look different than GTK or Qt based ones. SWT problems is the same as any other cross-platform gui like WxWindows. Swing though always looks the same no matter what the platform is. This means Swing apps look and operate the same no matter what the platform.

  16. We're comparing apples to oranges here by JustAnotherReader · · Score: 4, Insightful
    Everyone's talking about how Java requires the user to install a JRE and how Java is slow (I beg to differ) and how Java Swing is to bloated. All these complaints assume that Java's predominant use is to write desktop applications.

    But that's not what Java is being used for. The most common usage of Java is for high volume dynamic web sites such as Amazon.com and most online banking systems. The combination of Java servlets, Java Server Pages and Java based web engines (WebSphere or Web Logic for example, or even Apache and Tomcat) are becoming the most common usage of Java.

    I work at a major California bank and have worked on various web based applications for about 9 years. Java is the standard for writing those types of dynamic web apps. For example. When you want to see your financial summary you wouldn't expect that there is somebody writing a web page just for you every time to make an ATM transaction would you? Of course not. You log in and we identify you. Then we go to an Oracle database or a bank host system and get your transaction history. We load that into a data object and pass it to a JSP which dynamically creates the web page with your transaction history. Java excels at that kind of application. And by the way, I can develop my code in Windows 2000, move it to a Linux box to do some basic testing, and then move it (all without recompiling) to an IBM AIX Unix box and have everything work the same on all these different environments. That makes my job easier.

    So we need to stop comparing apples to oranges and saying things that essentially sum up to "A badly written Java program is slower than a well written C program" or "Java was slow 6 years ago so it's still slow today" or "I don't agree with the language designer's choice of [properties, no operator overloading or whatever language peeve you have]". Look at how the language is actually being used and you'll see that Java is indeed alive and well.