Slashdot Mirror


Java Rocks On Linux

Begonia writes "While we're on the subject of Java, I'm really impressed with its performance on Linux these days. I'm using IBM's latest (1.3) version of the JDK, which has only been out for a couple of months. And I just stumbled across this latest set of benchmarks for various JDK's on Linux and Windows here. Not dated, but must be at most a couple of weeks old. Lots of very interesting food for thought."

156 comments

  1. Re:I *can not* stand this anymore. by morastm · · Score: 1

    The facts have come down to this. Java applets (Java on the web) are going to be slow by their nature. The use of a Java plugin helps this some. The Novell GUI components are written and ran using a 1.1.7b compliant virtual machine. This version is slow. I will not argue that, but move this to a newer virtual machine with a Just-in-time compiler or HotSpot the speed difference will be seen. The problems so far with Java is that in its early days it was slow, and many vendors have not updated there products to use a new JVM. I have been using Java since it came out and have seen many of the new Java applications that are starting to be used more in mainstream situations, and the speed is now quite up too most native apps (not as fast but very close);

  2. Re:Java is plainly too slow. by cyberwinds · · Score: 1

    you really should do! LOL

    --
    Together, we are strong; Apart, we are stronger.
  3. Faster on linux? Maybe. by Aos · · Score: 1

    Hm... all I know is that a month ago I programmed for a couple of weeks using Netbeans on linux. Then on the last day I transfered it to win2000 on the same (triple boot) machine.

    Netbeans - which is itself written in Java - started up almost in HALF time on Windows 2000 than on linux. And yes, my kernel WAS optimized for K7 (Duron) and it was latest test5 or whatever, plus the latest either Sun or Blackdown JDK. Blackdown has built-in JIT and native threads. I haven't tried IBM's, I forgot about it.

    The program was a multithreaded simulation (not a commercial quality code, it wasn't optimized or anything) and was able to run (I think) with more threads on win2k before choking. Still, it was disturbing since I was expecting clean sweep by linux.

  4. Re:Java is plainly too slow. by jonabbey · · Score: 2

    Ah, ick. You will be *much, much happier* if you run-don't-walk to 1.3.0. I know that early JDBC had a lot of problems like you describe.

    And GC in Java is definitely not suitable for attempting to prevent non-memory resource leaks.. even the finalizer mechanism won't do it, since it is not strictly analagous to the C++ destructor mechanism. If you need to prevent resource loss, you need to wrap your activities with a try bracket and use finally to clean up.

  5. Re:Blackdown, ptreads, ... by samorodi · · Score: 1

    Actually some VMs (I think was IBMs 118 VM) do cause many additional entries in the proc table. It confused the heck out of me the first time I saw it until I realized that each thread showed the memory use for the entire process. In my case it was an app that had about 60 threads each with 25MB use which multiplied out is significantly more RAM+swap than I had. Off topic, but why is it that each of the threads maps to a separate entry in the proc table?

  6. Re:benchmarks "not dated" by Duckie01 · · Score: 1

    The "view page info" tells you when the page was last modified. Not when the benchmarking was done. Big difference there.

  7. Java for Linux is still far behind by dica · · Score: 1

    I develop Java under linux, but I still keep a windows box on my desktop for running and debugging java applications. Sure, linux jvm's are improving, but as Michael Hirsch demonstrated in the August 2000 Linux Journal, Microsoft and Symantec's JVM's for windows run faster than even natively compiled Java code under linux(using gnu gcj). So of course the windows JVM's run astronomically faster than linux JVM's.

    The windows machine I use is old and slow, and doesn't have much ram. The linux box is a new, high end, smp box. The windows box blows it away when it comes to Java performance.

  8. Re:Java is plainly too slow. by tricker · · Score: 1
    If you know what you're doing, the situation is different.

    Like using stringbuffers instead of strings when doing lots of concatenation.

  9. Too much java news! by itarget · · Score: 1

    There are too many articles about java popping up on slashdot lately. It's ONE programming language, and it's starting to give us all caffeine poisonning. :-P
    ---
    Where can the word be found, where can the word resound? Not here, there is not enough silence.

    --

    "Where shall the word be found, where will the word resound? Not here, there is not enough silence." -T.S. Eliot
  10. Re:hardware time is cheaper than programmer time by woggo · · Score: 2
    Strings are immutable. You ought to use StringBuffers and the append() method. Most JVMs will optimize a statement of the form
    System.out.println("notice: " + bar.numFrobnications() + "frobnications");

    to use a StringBuffer, but they won't do it for code within loops, like
    boolean doneYet = false;
    String foo = "";
    while(!doneYet) {
    foo = foo + String.valueOf(someObject.someMethod());
    }

    which allocates a new String object for each iteration, creates a StringBuffer for the addition, and converts that StringBuffer into a String -- leaving you with two objects that need to be created, only to be immediately garbage collected for each iteration.

    I posted some tips for optimizing Java in another thread -- many of the other replies in that thread are good as well. Have fun.


    ~wog

  11. Size matters by ChrisWong · · Score: 2

    Why do people only mention speed when evaluating Java? Memory footprint should enter the discussion too. And unfortunately, Java on Linux seems to suffer from bloatitis.

    A Swing app I am developing under JDK 1.2.2 for Linux uses about 20MB of RAM without JIT. It's not really that big a program. When I tested it under IBM's JDK 1.3 (prerelease), it ate about 30MB of RAM. With Sun's JDK 1.3 with Hotspot, it still uses about 20MB of RAM. Sun's JDK 1.3 tries to reduce memory footprint, but I am guessing that the additional overhead of Hotspot and native threading tends to erase this gain. It does start faster though.

    When writing a Java GUI app, speed may no longer be relevant. Most of the time, the application is waiting on user input. My app runs just fine on a P166 on a JVM in interpreted mode only (no JIT). Any speed advantage in the JVM is not noticeable. But the memory footprint is noticeable, and this also translates to a long startup time.

  12. Re:Java is the epitome of lag by badmonkey · · Score: 1

    Quake 3 has NO java in it. Carmack was quoted as having thought about using java. However, he has used his own interpreted language. Note the Q in QVM is different than the J in JVM...

  13. Re:Poorly written code == slow by Master+of+Kode+Fu · · Score: 1
    A well written Java app can be quite fast too. It's the many VB programmers who jumped on the Java bandwagon and use IDEs, misconfigured application servers, producing what they think is good code that give Java a bad wrap.

    Speaking of bad raps, it's quite easy to get one simply by saying you code in VB. There are many bad VB programmers out there, but that's becuase of the sheer volume of VB programmers out there. VB and its notorious cousin, VBScript, are the Perl of the M$ world; given Windoze's market share, it's no surprise that there's a large number of VB programmers out there, and naturally you'll have a large number of bad ones. You'll also find many good ones.

    However, bad VB programmers make a subset of the many bad programmers doing bad work in every language. One of the benefits of open source software is that I've had a chance to see how many bad C, C++ and Perl programmers are out there. Especially Perl. If you think that VB programmers are a piss-poor lot, then go look at some open source Perl code on Freshmeat or SourceForge some time -- you'll swear these people rode the short bus to school. You'll see brittle code, coupling on an near molecular level, barely cohesive modules, and a style that would make you think they were going for job security through code obscurity. For an excellent start, look at some early versions of Slashdot's source }:)

    VB's object model is actually decent. It feeds off Java's, and with version 7 (if the announcements surrounding VS7 are to be believed), the object models will be kissing cousins. VB7 will have inheritance (finally), constructors, variable declaration/initialization on the same line and method overloading. VB in its current state has property procedures, which are syntactically sweeter that creating get/set methods in Java. Some of the best Java programmers I've seem came there from VB, and some of the worst have come from C++ (particularly those who just used it as a souped-up C).

    As for IDEs, I think auto-complete (or Intellisense) is the programmer's greatest blessing, especially when developing in languages with large class libraries. As for drawing the user interface rather than hand-coding it, I say great! Anything that allows me to hand over UI design to a proper interface designer who cares about human factors over coder cred is fine by me. I think IDE developers should concentrate on making the GUI code that their IDEs generate better -- Borland have proven it's possible with Delphi and C++Builder.

  14. Re:Open Source Java? by rodgerd · · Score: 1

    Correction: Publicly owned companies have to operate in the best interests of key shareholders. More than once I've seen companies act in the interest of major minority shareholders and against the interests of others.


    --
    My name is Sue,
    How do you do?
    Now you gonna die!
  15. Re:Obviously, you didn't research your argument. by AFCArchvile · · Score: 2

    I have solid evidence that Java is slow and cumbersome: The IBM Point Of Service system. I work at parts counter at CompUSA, where these units are used as cash registers. These registers are running NT4SP5 (strange, considering that there are USB ports on the units). The POS program used is entirely written in Java. On power-up, there is a scripted FTP session to download JPEG files used for instant advertisement. The monitor functions as a display of the receipt (to comply with a recent town ordinance to show the customer the receipt; I'm going to oppose this ordinance, since it only spawns more Java programmers). The keyboard latency (time you have to wait before pressing another key) is 150ms. If the enter key is pressed before this time has elapsed, a certain letter will appear (proving that the Enter key and Escape key are remapped in the program). In C programs, there is no keyboard latency. The thermal receipt printer (suspiciously named the "IBM SureMark") makes a stuttering sound when sent its data to print. During the test print/paper cut sequence, there is no stuttering, proving that the Java program lags when sending data. There also have been problems recently when the entire Java data files were changed; there is an option for what kind of CompUSA credit card payment method (so we can manually trigger the 6 month no interest plan), but sometimes (and this has happened at the damndest times), a credit card will come up with a message of "Use Another Tender," and it won't let the cashier enter in an auth code. This became annoying once because I actually had an auth code from the creditors!

    So next time you say that Java is fast, just walk into your local CompUSA, and watch the cashiers cursing at the register terminals. The POS terminal program was coded by IBM's (snicker) Java (snicker snicker!) technicians (ROTFL!!!).

    I am majoring in Computer Engineering at the Wentworth Institute of Technology in Boston, so I will have to learn programming. However, I have made a vow to learn C(++) as a second language. Maybe I'll learn Java, but it will have no place for me, since Java-driven drivers are the worst drivers.

    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  16. Re:hardware time is cheaper than programmer time by woggo · · Score: 1
    The JVM's default optimization is quite simple-minded. That code will work like you say, but here is an example which won't be so lucky.

    That's all I'm saying. For simple, one-time one-liners, it's probably OK to use "+". However, most performance problems that need optimization arise in loops; most Java performance problems have to so with unnecessary object creation.


    ~wog

  17. Re:You Used The Wrong Tools For The Job by Ars-Fartsica · · Score: 2
    Now for medium to large scale, cross platform, multithreaded, easily extensible, middleware applications that will need little or no maintainance but are easily maintenable, Java[tm] cannot be beat.

    The only one I'll give you is XML support. Java probably has the best support for XML right now - too bad its general text-handling sucks.

  18. Re:Java is plainly too slow. by hugg · · Score: 1

    I shouldn't add to this Thread from Hell, but I cannot resist...

    I am currently working on a 3D game/simulator written in Java, using 1.3 + Hotspot + OpenGL. So far it is performing excellently. I see no garbage collection pauses, no memory thrashing (yet), and get 40-50 FPS without *any* optimization. In fact, the current code base commits several crimes against nature, and uses some incredibly hairly floating-point algorithms. Java chugs right through them.

    I am not fond of a lot of Java's *libraries* -- like AWT, Swing, Java3D -- I fault Swing for being too complicated and monolithic, and Java3D for not being OpenGL. Therefore I don't use them. But the language is clean and nice, and now it's fast too. Sure, there is some overhead compared to optimized C++, but I am not competing in the FPS-junkie market.

    Some benefits: Supporting the game will be much easier when my users can give me a stack trace + line numbers where the program failed. No need for a separate scripting language. Users can extend w/ their own classes. Patches can be on a class-by-class basis. And so on.

    Now don't get me wrong, I'm scared as hell about releasing a Java game and the market accepting it, and trusting Hotspot not to have any show-stopping bugs. But right now, the only way you can tell it's written in Java is the little coffee cup in the upper-left of the window. I think if you don't have to be cognisant of the fact that it's in Java, you won't mind when you find out.

    Anyway, my backup plan is ... translate to C++. :-p Should only take a couple of months...

    BTW you can read my Tech File on flipcode.com if you want to read about my progress.

  19. Re:On Java's Slowness by teaser_stud · · Score: 1

    Nothing prevents the Java 2D vendor's implementation from using hardware acceleration, and in fact it should indirectly do so already. For example, if the implementation makes calls to DirectDraw, than it should end up using acceleration. Ditto with Quicktime/QuickDraw.

    Also, I disagree that the performance sucks.

  20. There is NOTHING you can do in DELPHI... by Dawn+Keyhotie · · Score: 1
    There is NOTHING you can do in DELPHI...
    1. ... that you can't do in ASSEMBLER.
    2. ... that you can't do in PL/I.
    3. ... that you can't do in LISP.
    4. ... that you can't do in PILOT.
    5. ... that you can't do in TURING.
    6. ... that you can't do in FORTH.
    Get over it, bud. People use the tools they like for the jobs they can. Other jobs, where shit like this is forced down their throats by PHB's, they grumble and do the best they can.

    Personally, I like Delphi. And I can't wait for Kylix to debut. But you don't have to be an asshole about it.

    --
    "The only good windmill is a tilted windmill."
  21. Re:Java is plainly too slow. by cyberwinds · · Score: 1

    I really do not have problem with Transmeta, as I often do the following: gdb disassemble blahblah Guess you do not know much about compilation and stuff like that. C is still much more superior than Java which produces lousy bytecode which then excutes on a VM. Ok, add one more layer maybe get more fun. Create a layer called "JavaZealot AttitudeChecker" to kick all other's butt would be nice.

    --
    Together, we are strong; Apart, we are stronger.
  22. How does IBM's embedded Java VM on Linux compare? by SlashFrog · · Score: 1

    I wonder how IBM's new embedded Java VM for Linux compares. It's available as a beta for x86 and PPC Linux. MontaVista recently made an announcement that they'll be distributing it with their release of HardHat Linux.

    --
    --- One world, one chance Doc.
  23. Re:Java is plainly too slow. by rblum · · Score: 1

    Thanks!

    I don't believe it - actual useful information on Slashdot :-)

    I'd love to run to 1.3, but we're using 1.1 in production right now - that means a complete new test cycle.

    I guess I'll wait for the next release :-}

  24. An amazingly unfortunate typo by FatOldGoth · · Score: 4
    Well, at least I assume it was a typo.

    I suppose all this affect benchmarks too; most readers today will be more interested in testes that show server-like workloads.

    I think if my testes showed server-like workloads they'd rupture.

    --

    I would be a paid subscriber if Taco and Hemos weren't such cunts
    1. Re:An amazingly unfortunate typo by chris.bitmead · · Score: 1

      Yeah um, a garbage collected app that only runs for a few seconds will simply not collect the garbage. In other words, it's memory reclamation scheme is simply not to bother. Hardly a fair or realistic comparison. Just shows again that there are lies, damned lies and....

    2. Re:An amazingly unfortunate typo by Ronin+Developer · · Score: 2

      I guess this something we should aspire to, eh?

      Good catch!

      However, to add some content, Borland demonstrated how much more efficient Java's garbage collection system is over native Windows memory management (i.e. New/Dispose) at the developer's conference this year.

      They ran a demo where the allocated and destroyed over a million objects. The Delphi version took several seconds to run. The Java one ran in under a second.

      They also demonstrated a few other "benchmarks". While Java didn't always win, it showed performance that was far better than I ever expected in many areas. As the VMs are optimized, I expect the performance gap to close even more.

      RD

  25. Re:professional Java developer? by claes · · Score: 1

    I make my living that way. Of course I am professional then.

  26. Re:Please, no more articles about benchmarks by davidb54 · · Score: 1
    Yes, it is interpreted. The JVM is an interpreter. Your confusion probably results from the fact that Java code is said to be "compiled" (e.g. javac foo.java => foo.class). But the Java "compiler" is not a compiler in the same sense as a C, C++, or Fortran compiler. The Java "compiler" simply takes the text file you give it and outputs a binary file which is then *interpreted* by the JVM.

    This is why they call it a "virtual machine". The JVM is the "target architecture" for "compiled" Java code. It has its own binary-coded instruction set, and Java "compilers" simply produce output for that instruction set. The JVM takes instructions for its "architecture" and *interprets* them to the native architecture (e.g. Intel/x86, Sun/Sparc, etc). It does not matter that you think you've "compiled" your Java code by typing a command which reads a text file and generates a binary file. The binary file still has to be interpreted by the JVM.

    I can only assume that you did not know this, Anonymous Coward. Does this help clue you in?

    Dave Bailey

  27. Re:Obviously, you didn't research your argument. by Anonymous Coward · · Score: 1
    I have solid evidence that Java is slow and cumbersome: The IBM Point Of Service system.
    Not at all. The only thing you have evidence of is that the IBM P.O.S. system is slow and cumbersome. This has very little to do with the programming language used to implement that system, but instead indicates that the system was poorly designed. A poor design, of course, is poor no matter what programming language or tools are used to implement it.

    Start considering design issues more and tools/language issues less, if you want to be a good programmer...

    Besides, claiming that "Java is slow" is silly anyway, since Java is just a language. Even if it were slow, it would be the JVM -- not the language itself -- at fault. The newer JVMs are nearly as fast as native C/C++, assuming a properly designed application.
  28. Re:So why no JVM in Mozilla? by demon · · Score: 1

    And your point is...? IBM's JRE for Linux works quite well, and is actually rather fast. I don't know if it supports OJI or not, but if it does, then it should (in theory) work fine without waiting for Sun to get their shit together and make a Linux release.
    _____

    --

    Sam: "That was needlessly cryptic."
    Max: "I'd be peeing my pants if I wore any!"
  29. Comment removed by account_deleted · · Score: 2

    Comment removed based on user account deletion

  30. Re:You Used The Wrong Tools For The Job by Angst+Badger · · Score: 2

    Perl is the king of text processing languages (no contest)

    Any language X is the best at Y thread ought to result in the spontaneous combustion of the poster's terminal. From a technical standpoint, you could make a pretty strong argument that Icon is a much better text processing language (and a better language in general) than Perl, and that Oberon's Juice JVM is structurally better-suited to delivering high-performance platform-independent binaries. Of course, you won't hear much about them -- or dozens of other great technologies -- because developers seize on the first thing they like and congeal and harden around it, forever after ignoring anything else that comes along. The popularity of programming languages and other technologies has next to nothing to do with technical considerations and everything to do with the same instinct that makes 13-year-old girls decide they all like Britney Spears simultaneously. Of course, software engineers can typically provide more compelling-sounding arguments for why they closed their minds as soon as they found Language X.

    Maybe this is unavoidable in the relatively conservative, unimaginative corporate world -- the help wanted section in twenty years may still consist of a set of twenty or so acronyms repeated over and over -- but there's no excuse for it in the (let's face it) largely unpaid world of free software. Get out more.


    --

    --
    Proud member of the Weirdo-American community.
  31. Blackdown, ptreads, ... by KidSock · · Score: 2

    I find it hard to belive that Java is really faster on linux than it is on just about any other platform. At least Java 2 anyway. Do they have native threads yet? Blackdown changed their status page. Where's the checklist page? If they do use native threads I guess they don't use ptreads. If they did each thread would appear as a separeate LWP. Imagine running a Java proggie that had 300 threads and then looking at top and finding 300 6MB processes(linux threads reports same total memory usage of all threads for each individual thread). Although I have never done any benchmarks my feeling through expirience is that its just a little slower due to particular memory usages and other stuff I have heard. But maybe they sorted some of that stuff out. Great to hear if it's true. I wouldn't develop on anything else even if it where half the speed.

    KidSock

  32. Re:Java strong at the server, weak at the client by Cederic · · Score: 1


    As someone employed to write enterprise level systems using Java, EJBs, Servlets and JSP I have to agree.

    For client-side stuff, if you're deploying on Windows use Delphi or VB. If you're deploying on Windows or elsewhere use a web client, with the right mixture of static html and dynamically generated by JSP/Servlets.

    For server-side stuff, Java is very very fast to develop, and in EJB servers it's very very dependable, scalable and fast. Integration with the various legacy systems you have is also very easy, through CORBA/E-Link/etc. Most vendors of enterprise scale systems are providing native java APIs now too.

    I use Java at work because for writing server-side business logic, it's the quickest easiest language to use and my business people demand software fast.

    ~Cederic

  33. Re:Java is plainly too slow. by Chris+Siegler · · Score: 2

    People who say that Java is slow are correct, for the most part. Even with the best JVM, Java cannot approach the speeds of a well-designed native-code application.

    You forget that Java can be compiled too. Just look at GCJ

    Java is really three things. JWZ has a nice paper about this. It's a language, virtual machine, and class library.

    The JVM indeed slows things down, and the class library does some too. But Java the language, even when natively compiled, is slow all by itself.

    After all, the GCJ project uses the gcc/g++ compiler code base. So why is a C++ application compiled with g++ so much faster than a gcj compiled application? Must be the use of exceptions and GC (in the form of a shared library with gcj).

    So Java isn't slow, exceptions handling and garbage collection are slow.

  34. Re:Java strong at the server, weak at the client by X · · Score: 1

    Most modern Java VM's use incremental, generational GC's that can execute in their own thread. As such, you should not have GUI freezes during a garbage collect. If you are having this problem, check your VM setup.

    Swing does not provide a native GUI. If you want this, you should use AWT. Swing is meant to allow you to design your own look and feel (and btw, adding wheel mouse support to a look and feel isn't THAT hard).

    Generally speaking, it's safe to say that the standard GUI libraries for Java are not as muture as one would like them to be. However, the language itself is quite well suited to building GUI applications, and really just needs to have the GUI libraries updated a bit more and it'll be pretty sweet.

    --
    sigs are a waste of space
  35. Re:Java is plainly too slow. by Cederic · · Score: 1


    Execution speed is only a minor issue when choosing a development language - otherwise, wtf is there so much stuff written in perl/VB/etc.

    When someone in marketing comes to me and says 'we have this new campaign, but the system needs to support X in 3 weeks or we can't run it' then I like being able to answer 'we can do that'. The reason that 'we can do that' is that we are using a language that lets us develop quickly, dependably and still write maintainable code. Sure, re-writing something in C could shave milliseconds off the time taken to handle each customer - but even in that one system out of every 20 where those milliseconds matter, it's almost always cheaper and much much quicker to just chuck some slightly beefier hardware at it.

    ~Cederic

  36. I've heard of Java Beans, but "Java Rocks"? by glitch! · · Score: 4

    I'm glad to hear that we now have "Java Rocks". Not that I have the slightest clue how to implement an application or class library on this new development, but it just sounds cool.

    Isn't a cool name the core of any new technology product?

    It brings up an image - I see it now! A penguin hurling Java Rocks at stained windows...

    Enough pointless rambling :-) I have enough serious rambling yet to finish.

    --
    A dingo ate my sig...
    1. Re:I've heard of Java Beans, but "Java Rocks"? by peterthomas · · Score: 1
      I think it sounds more along the lines of Tux smoking crack!

      I know he must doing quite well now, but ....well!

  37. Java Will Die... by istartedi · · Score: 1

    ...when they run out of cute caffeine inspired names to call things. Now let me get back to that new compiler I'm working on. I call it "The Percolator".

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  38. Re:Java is plainly too slow. by Doug+Marker · · Score: 1

    Hmmmm - I did realise you & your ilk were still alive. I had though that in 1998/9 you and the others like you peddling this Redmond line line had all either been beaten to death, choked on your own froth (mouth froth) or just evaporated. Redmond - you know, the ones who invented a basic interpreter that ran on 12Mhz x086 processors but still did the job and survived. Java has you licked and you just don't or won't get it. Pls return to your grave & sleep in peace while we get on with life & the job done (with Java of course). Cheers DSM

  39. Java is plainly too slow. by cyberwinds · · Score: 1

    And by sticking to platform independent, it is not glued to the operating system tightly enough to use system resources directly. This makes it even slower.

    --
    Together, we are strong; Apart, we are stronger.
    1. Re:Java is plainly too slow. by deusx · · Score: 4

      Okay, repeat after me:

      HARDWARE IS CHEAP. PEOPLE ARE NOT.
      HARDWARE IS CHEAP. PEOPLE ARE NOT.
      HARDWARE IS CHEAP. PEOPLE ARE NOT.

      So, Java's a little slower on the runtime versus native code. Quantify that difference (call it X).

      On the other hand, I've heard (and experienced) that writing with Java and its APIs is much faster and easier than learning and writing code to various OSes and their bare-metal system resources. Quantify THAT difference (call it Y).

      So, what's the per-unit cost to compensate for X across multiple forms of hardware. What's the per-unit cost to compensate for Y across OSes, people, and systems.

      I'd be willing to bet, were this all actually well formulated as an equation, that you'd find we really don't give a shit anymore about how blindingly fast a given programming language can be if you're hacking close to the hardware. Hardware is cheap, just throw another faster CPU at it. People, however, are much harder to upgrade.

      hen a programmer just has to know one pretty simple language and API, rather than many OS quirks and tricks and system-resource details that distract from the main task at hand, programmer cost goes down. Make it easy for the people, and it becomes so much cheaper that we accept a margin of performance cost on our easily improved hardware.

    2. Re:Java is plainly too slow. by casa123 · · Score: 1

      hmmm once again, obviously you havent used enough java.

    3. Re:Java is plainly too slow. by cyberwinds · · Score: 1

      "It runs nicely, the GUI's concept is simple to understand" What is your point? "runs nicely" really means nothing. "GUI's concept is simple to understand" I agree. But when it is 20 levels down the hierarchy to Object to get a FlashyImageButton, I would not doubt how slow it could get.

      --
      Together, we are strong; Apart, we are stronger.
    4. Re:Java is plainly too slow. by macpeep · · Score: 4
      Interesting, guess linux should be rewritten in Java.

      Uhh... Use the right tool for the right job. I'm not, of course, saying everything should be done in Java. I'm just saying that for many things, Java is great and it has it's place - as does many other languages and technologies.

      I just read an article where Linus Torvalds says his siblings and grandparents use Windows cause it has better support for the apps they need. Fair enough. He doesn't jump out the window cause of it or start crying that Linux is the only way to go. The same attitude might be smart when dealing with languages and software platforms. A professional software engineer uses the best tools for the job.

    5. Re:Java is plainly too slow. by Orava · · Score: 1

      Ho hum.

      Yes, Java is slower than C or C++. Does it matter? Yes, if you're doing graphical stuff or heavy GUIs. Not at all if you're doing server-side stuff, where Java's built-in multithreading and exceptions kick ass, so to say.

      Java is brilliant for a lot of stuff, less brilliant for some others. Right tool for the job, you know?

    6. Re:Java is plainly too slow. by cyberwinds · · Score: 1

      "Anyone can code a crappy app in C and say "woah! look, it sucks! it's slow!". That doesn't prove that C would be slow - it proves that the code sucks. In the same way, an amateur not knowing what he or she is doing with Java can see slow apps. If you know what you're doing, the situation is different. " From your arguments, I derive that Bill Gates do not know what he is doing. "Millions of Java coders and companies use Java" do not mean a thing at all. Why do not you mention that 99.99% desktop users use Windowz?

      --
      Together, we are strong; Apart, we are stronger.
    7. Re:Java is plainly too slow. by birder · · Score: 1

      How much of this is attributed to improved Java implemenations vs faster CPU.

      In other words, has it really improved _that_ much or is it hiding behind quick cycles.

    8. Re:Java is plainly too slow. by ActionListener · · Score: 1
      My story is as anecdotal as any, but what is so bad about Swing?

      Well, here's one problem I have with Swing: Try using a wheel mouse with Swing. The wheel doesn't work. This will seriously frustrate those of us with wheel mice.

    9. Re:Java is plainly too slow. by macpeep · · Score: 3

      Not just CPU - but of course it also helps some in making the speed disadvantage less noticable. I have this old texture filler that I coded some years ago to test the speed of Java graphics and on JDK 1.1.4 (or .3 or whatever) it ran with about 8 frames per sec on a given texture on a given polygon on a given app on a given computer. Microsoft's jview clocked around 12 fps.. Then with JDK 1.2.0, it dropped to around 3 (!!) on some color models, but I wrote another version that used a color model without any alpha channel and the speed was now somewhere around 8 fps. Meanwhile, JDK 1.1.8 was clocking up to 15 fps. With 1.2.2, it's up to 17 and 1.3.0 is almost at 20 fps. This is still with the same machine, same texture, same app.. The computer I use for this is my IBM 390 laptop that has a Pentium 233MHz MMX. On my AMD K7 / 500 Mhz, I get over 45 frames per second using 1.3.0.

      The speedup is directly visible in apps that use GUI's - Swing in particular.

    10. Re:Java is plainly too slow. by Anonymous Coward · · Score: 1

      I have seen many many people argued about Java performance. Frankly speaking, very few people get to the point. As a (previous) core developer in one of the major jvm teams, I have to point out some common mistakes. First of all, the Java performance has almost nothing to do with JVM. If you compare the classic Java interpreter against Perl or Python interpreter, the Java interpreter is about 300% faster than Python or Perl. The latest Java compiler is about 20 to 40 times faster than interpreter. I have heard very few people complains about performance of Perl or Python, while almost everyone complain about the Java performance. What the hell is going on here? The real problem is library. For people who have studied the Java core library, they will find the most of the Java library are terribly written. Taking the io as an example, the Java FileInputStream, which is not buffered and needs double copy, resides on top of libjava.so, which relies on the JVM layer, which relies on HPI layer, which is on top of libc. In order to read one line out of a file, you need one encoding converter, which converts byte to unicode. And you still need a buffered stream reader, otherwise you application will be dog slow. If you take a look at awt, swing, 2D, networking, you will find most Java core libraries are poorly designed and implemented. The java.net does not support select() or poll(), so it enfore people to create hundreds of threads just for waiting on socket. The 2D render the image in Java memory using C and Java code, which rule out any hardware accelartions. Missing regular expression has enforce people to write many error-prone and slow test processing code. As a rule of thumb, any well written Java code is about 50% of speed of C. This is not a big issue for most of people. C itself is about 50% slower than assembly. Most C++ application is 50% slower than C, the same for many other high level languages. The slow of Java is not because of JVM performance, not at all. It is caused by poorly designed and written libraries. Consider this, can anyone in the world write "Office" in Java? I have run Microsoft Word 6.0 on i486/66MHz with very reasonable performance. I will be really surprise if anyone can finished the full blown "Office" with reasonable performance on Pentium 600MHz.

    11. Re:Java is plainly too slow. by Pentagram · · Score: 3

      Java too slow? We've heard that a million times. Boring. It's quick enough for thousands of Java hackers out there.

      It's not as quick as C performance-wise, but you get a speed tradeoff in return for platform independence, greater stability etc etc. The vast majority of apps being written today do not need to be blindingly fast. It's much more useful to have them written faster and be easier to mantain, both of which are helped a lot by Java.

      I suspect most of the flame I hear against Java is from established C coders who are scared they'll have to learn a new language. Try it, you might like it. I use Java and Perl almost exclusively now. I wouldn't use C now unless I was feeling masochistic or had to do something really low-level.

    12. Re:Java is plainly too slow. by harmonica · · Score: 2

      What is your point? "runs nicely" really means nothing.

      You said:
      Have you ever used the swing JFC? If you have tried the demos included in the distribution, you know what I am talking about.

      I simply say that I'm programming an application that is quite a bit more complex than the demos and there is no problem with it. No flicker, no slow GUI refresh, no problem. I also get along quite fast because Swing is easy to understand. So whatever you experienced isn't true for me -- got it?! The statement '...try the demo and you'll know what I mean' is simply nonsense. My system is a P-II 350, so not exactly the fastest machine.

    13. Re:Java is plainly too slow. by harmonica · · Score: 2

      Will be fixed in 1.4, according to some guys in comp.lang.java.programmer. There already is a fix, but only for Win32...

    14. Re:Java is plainly too slow. by cyberwinds · · Score: 1

      I have been using java since JDK1.0 on Sun 2.4, Solaris, Linux, windows. Have you ever used the swing JFC? If you have tried the demos included in the distribution, you know what I am talking about.

      --
      Together, we are strong; Apart, we are stronger.
    15. Re:Java is plainly too slow. by iapetus · · Score: 1

      One of the problems with the JFC demos shipped with the JDK is that, by their very nature, they're using most of the functionality of Swing, which places a fairly high overhead on the system, particularly when the app is first loaded. IIRC this is improved somewhat in the latest releases of the JDK.

      A real-world application isn't going to use as many of the different UI components: probably just a fairly minimal subset of them (buttons, menus, labels, textfields and so on) so you won't hit the same kind of problems when you're writing a real application.

      Of course, there's always the question of where the slowdown's occurring. I've seen Java UIs written by big-name companies with much Java experience that are painfully slow. I've also seen more complex Java UIs that are comfortably fast. It all comes down to how well you write your code, and there are still a lot of people out there who don't have a clue.

      My one real complaint about Swing is that stupid bug that's still there which prevents applications shutting down neatly (this one). Evil hackery should not be the recommended way to make your application stop.

      --
      ++ Say to Elrond "Hello.".
      Elrond says "No.". Elrond gives you some lunch.
    16. Re:Java is plainly too slow. by Me2v · · Score: 4
      I work in the industry, and currently code COBOL, Java, REXX, and Easel (does anyone remeber that piece of crap!!). I can say with authority and absolute confidence that a well coded application in C is lightyears faster than a well coded application written in Java. I attribute most of that to the JVM, though.

      I've seen 'real' applications written in Java. I've used Moneydance personally, and several custom apps we've designed at work, and a couple of shrinkwrap apps written in Java, both stand-alone and Web-based. For the most part, they perform very well. Java does indeed rock as a programming language. That, however, is a seperate issue from it's execution speed, and it's speed (or lack thereof) cannot be attributed to the language as a whole, but rather to the implementation of the JVM. A good JVM and/or JIT greatly enhances the Java experience.

      People who say that Java is slow are correct, for the most part. Even with the best JVM, Java cannot approach the speeds of a well-designed native-code application. This does not mean that Java is a bad programming language, or inappropriate for mission critical apps. We have several mission critical apps written in Java. They run well, and are stable. The loss of speed in the application, though, was not great enough to outweigh the benefits of the cross-platform execution. We can design the app on AIX, OS/390, OS/2, Windows NT, or Windows 2000, and we can compile that app once, and then we can take that compiled app and run it on AIX, OS/2, Windwos NT, or Windows 2000, or OS/390. The simple fact of 'compile once, run anywhere' so far outweighs the speed loss that it's worth it.

      So, you are wrong when you say that "The very fact that someone claims that shows that they are not in the industry and have no idea what's going on in the Real World (tm)". I say that Java is slow, and I work in the "Real World (tm)". It's just that the slowness disadvantage is not near as important as the advantages.

      --
      Matthew Vanecek For 93 million miles, there is nothing between the sun and my shadow except me. I'm always getting i
    17. Re:Java is plainly too slow. by macpeep · · Score: 5
      Java is plainly too slow

      *yawn*

      Obviously it's fast enough for the couple hundred thousand or so (millions?) of Java coders and companies that use it every day in mission critical applications all over the world.

      Seriously, I doubt you have any real world experience with Java if that's still your take on it. Yeah, three years ago, it wasn't fast enough. Things have dramatically changed since then.

      Anyone can code a crappy app in C and say "woah! look, it sucks! it's slow!". That doesn't prove that C would be slow - it proves that the code sucks. In the same way, an amateur not knowing what he or she is doing with Java can see slow apps. If you know what you're doing, the situation is different.

      I don't know about the rest of you here but I'm getting very tired of the same old "Java is slow" and "I've never seen any real apps in Java" myths here on Slashdot. The very fact that someone claims that shows that they are not in the industry and have no idea what's going on in the Real World (tm).

    18. Re:Java is plainly too slow. by harmonica · · Score: 2

      I'm just in the process of writing a Swing app (JDK 1.3 / Sun). It runs nicely, the GUI's concept is simple to understand, so -- where's the problem? My story is as anecdotal as any, but what is so bad about Swing?

    19. Re:Java is plainly too slow. by Coz · · Score: 1
      You must have a real problem with Transmeta, then, since their entire concept is to keep people from programming to the actual hardware - they translate the input instruction set (x86 now, more later?) into whatever their hardware eats - just like Java bytecode is translated into the target machine's instructions.

      Obviously, these concepts and platforms are just too inefficiecient for you to waste your time on. Go back to hand-coding your assembler.

      --
      I love vegetarians - some of my favorite foods are vegetarians.
    20. Re:Java is plainly too slow. by jonabbey · · Score: 1

      Most JVM's don't bother doing garbage collection much unless your program bumps up against the maximum heap that your JVM has pre-set. Sun's HotSpot JVM's are supposed to do garbage collection continuously (or nearly so) in a background thread, so you can certainly have some code that grows the heap faster than the garbage collector can chase it down, at least for awhile.

      There are other kinds of resources that can be 'leaked', though, including native Graphic contexts, file descriptors/sockets, and the like.

      What version of the JDK/JVM are you using? Exactly what resources are you leaking?

    21. Re:Java is plainly too slow. by rblum · · Score: 1
      Well, it can certainly do for some applications. What annoys me greatly, thoug, is that there is a huge possibility for resource leaks. And it's not really pretty to track them down.

      Now, before you get out the 'no experience' club, I am working on some real world Java right now.

      And it _is_ leaking all over the place. The frigging JVM does not release resources even though the owner goes out of scope. Yes, I know, that's what GC is for. But it could take a hint from the scoping.....

      Apart from that, Java is a great tool if you apply it to the right problem. But the "Java is the savior' attitude that permeates the industry is about as bad as the 'Java sucks' posts here...

    22. Re:Java is plainly too slow. by cyberwinds · · Score: 1

      "I don't know about the rest of you here but I'm getting very tired of the same old "Java is slow" and "I've never seen any real apps in Java" myths here on Slashdot. The very fact that someone claims that shows that they are not in the industry and have no idea what's going on in the Real World (tm)." Interesting, guess linux should be rewritten in Java.

      --
      Together, we are strong; Apart, we are stronger.
    23. Re:Java is plainly too slow. by teaser_stud · · Score: 1

      I am so sick of people who mindlessly bleat that Java is slow. These people invariably have no idea what they're talking about. I have worked extensively with Swing, Java 2D, Enterprise Java Beans, Servlets, JSP, and more. I have also programmed in C and C++. I also like C and C++ but Java has an awful lot to offer (easy distributed apps with RMI, transaction support with EJB, elegant UI's with Swing, platform independence, a clean language... the list goes on). Please go and download the Java 2D demo and watch real time anti-aliasing, alpha compositing, and bezier curve animations. Please tell me why so many financial and ecommerce companies are building their services on EJB's, when Java is "plainly too slow". There are projects where Java would be less or not appropriate -- device drivers, kernels, daemons.... For the rest, performance is perfectly acceptable, in my extensive experience. The "too slow" argument can be further destroyed by pointing out that you can link and call native code from java, using JNI. So if you have a performance bottleneck -- such as a time-intensive algorithm -- you can write that algorithm natively and call it from java. It is rule of thumb that 90% of a program's execution time takes place in 10% of the code. If absolutely necessary (and normally it isn't), code that 10% natively and let the rest of your application take advantage of Java. On the server side, most of the performance criticism is moot because scalability can be achieved through server clustering. Boxes can be added relatively inexpensively and easily as load increases. Nobody can stop an idiot from writing a slow program in any language. If you know what you're doing, you can write an acceptably fast application in Java.

    24. Re:Java is plainly too slow. by rblum · · Score: 1

      JDK 1.1 - don't ask, and you won't hear the horror :-)

      It's leaking DB cursors. The following
      void f(Statement stmt)
      {
      ResultSet stmt=stmt.executeQuery("SomeQuery");
      while(rs.next()){
      // ... blahh
      }
      }

      leaks a cursor every time you call it. You have to insert close() statements manually. Sigh!

      And this really does annoy me - Javas GC has been touted as the 'end all leaks' solution - and then the frigging language allows leaks in other places.
      Oh well - maybe I can gain something by overloading the class loader. Anybody got any experience with that?

  40. Re:Poorly written code == slow by Stu+Charlton · · Score: 1

    I like Java, but I tend to like Smalltalk more.. just because I feel Smalltalk's class libraries tend to be more mature and elegant, and the syntax is more "english like" as opposed to "C like".

    For instance, in ST I can iterate through a collection like so:

    myCollection do: [ :eachElement | eachElement doSomething ].

    which in the Java is basically:

    Iterator it = myCollection.iterator();
    while (it.hasNext()) {
    (ElementType) eachElement = (ElementType) eachElement.next();
    eachElement.doSomething();
    }

    I donno, I find the first more understandable even though it has less words.

    the ST stuff in square-brackets is basically a block, which is pretty much like an anonymous inner class with one method, "value", that is called upon each element iteration by the do: method.

    --
    -Stu
  41. Re:I give up. by Anonymous Coward · · Score: 1
    Could you please explain what you are referring to, or could someone else give it a try who knows this moderator and what his problem might be?

    It would certainly help to quickly reject all obviously useless or juvenile posts such as "first post", penis bird ads, etc. I have found in that there is absoutely no relationship between the value of a post and how it is moderated, most of the time. Therefore to read the really good posts, most of which are moderated at level 0 (not obvious flamebait but not "notable" opinions by those who say the expected platitudes) I have to also deal with the crap.

    I really don't like the way AC posts start one point lower, at leve 0, than posts from those with user accounts. A user account does not hold the writer responsible if he uses a hotmail or other indirect email address, and the user information furnished is often intentionally misleading. User information should be confidential anyway. If someone wants to publish his email address in the body of the post that should be up to him or her, but otherwise only Slashdot should know the true user info and should guard it carefully. Even AOL does that for its users.

    Slashdot is too chickenshit to do the right thing and exercise editorial control by removing crap posts (many of which are generated with trolling robots) and therefore all readers are penalized. Other sites edit posts (delete the really offenseive, useless ones) and don't get sued out of existence. What's the deal here?

    I wish to hell that slashdot would die but there is nothing to replace it with. You guys killed kuro5hin. Actually, the choice of stories here is quite good, but the lifetime of stories is far too short for thoughtful posts most of the time. Again, more often than not the best posts are not even visible at the default viewing level, and some of the replies to posts that don't show up are even better.

  42. More Java benchmarks by harmonica · · Score: 5

    Fact is, you can't say Java is fast or slow, it depends a lot on the context.
  43. Beside the point by bigsweatyballs · · Score: 1

    This hole thing is irrelavent, Due to the fact that -even on Linux- Java is slower than goat-ass. Personally, I don't understand why Java has all these fans when Python basically does everything (Except that security feature) and more that Java can do, yet remains about 100-1000 times faster.

    --
    "Your pen is bugged..." "How do you know? " "This is an action thriller" :Helicopter with machine gun
  44. Re:I give up. by DeadSea · · Score: 2
    The problem is not the posts that get moderated up, it's the posts that don't and the moderators that blow their load on the first 30 posts.
    I have a few observations and theories on this point.

    The first problem I see is that the first posts to an article are the most likely to be modded up. Moderators tend to hang around the couple most recently posted stories.

    Not everybody refreshes Slashdot every two hours. The people that do, are the ones that agree most with the stereotypical slashdot agenda.

    Insightful posts take time. It could easily take an hour to *read the article*, do some other research, and post some meaningful commentary. Those who post fast seem more likely to spout out their gut feelings.

    To sum up: The people who post first are likely to be avid slashdot readers and more zealotous. Posts that are made soon after the article goes up are not as likely to be based on facts.

    On hot trigger issues such as this one, I have read comments soon, then comments later and been pleasantly suprised by a couple better posts that get moderated later. Often on looking further, I notice that there are several more that I would have modded higher than the ones that are modded higher.

    Let me try to illustrate this with a graph:

    PostQualityv sTime:
    |high
    |
    | +---+
    | +++--+
    |+-+ +---+
    |++ +---+
    |++ +---------------
    |++
    |+-+
    |++
    |++
    |
    |low
    +-----------------------------------------
    time-- ->

    Sumofmoderationdone
    |more +-------------------------
    |+-----+
    |+--+
    |++
    |+
    |++
    |+
    |+
    |+
    |+
    ||
    |
    |less
    +-----------------------------------------
    time--->

    As you can see from the graphs, I think there are a lot of good comments posted later that don't get moderated, while a lot of earlier comments that might not be quite so good, do.

    I suggest the golden moderation system.

    You get 5 moderator points.
    2 of the are gold.
    2 of them are silver.
    1 of them is bronze.

    gold points can be used on any post at any time. Silver points can be used on posts attached to articles that are more than 2 hours old. Bronze points can be used on posts attached to stories that are more than 1 day old.

    I think this would really do wonders for Slashdot

  45. Re:So, about Java on LINUX... by Tom+Davies · · Score: 1

    I think you were reading a different article.

    Tom

    --
    I have discovered a wonderful .sig, but 120 characters is too small to contain it.
  46. Re:benchmarks "not dated" by Duckie01 · · Score: 1

    True, but it does tell us one thing, the benchmarks are a minimum of 2 weeks old.
    That's very true :-)

    I'd suspect that the benchmarks went up on the page as soon as they were ready. I mean, why would you delay posting them once they were completed?
    Several reasons are possible. I could imagine that they finished more than one set of benchmarks at once, so they have more than one story. At the same time, they don't want to flood the site with benchmarks and stories. So they keep one of 'em on the shelves.

    Or they do all the testing one weekend (or two weekends), and the story around the charts some time later because something more important came up in their lifes.

    Also, somebody might have corrected some spelling mistake on the pages, which would influence the date when it was last modified.
  47. Re:Not surprising at all... by Mark+Imbriaco · · Score: 1

    Veritas also has an outstanding Java based admin tool for their cluster server software package. It's incredibly snappy, and helps to take away some of the stigma that is usually associated with Java based interfaces being slow.

  48. Re:Poorly written code == slow by KidSock · · Score: 1

    Yeah, that looks pretty simple. I have not looked at Smalltalk too much but the GOF "Design Patterns" book and people into OO theory obviously like it.

    But what if you want to break out of the iteration when a particular element is found?

    meaning, ...if(eachElement.equals(whatImLookingFor)) { break; }...

    KidSock

  49. Re:I give up. by WasterDave · · Score: 1

    ObAOL: Me Too.

    I can't really tell what the real problem is here. There seem to be two symptoms: Loads and loads of +5's and trigger happy posting. Easy kill solutions would appear to raise the moderation limit to 10, and have an hour - SIXTY GODDAM MINUTES - before you can post. Hopefully somebody somewhere will actually read the story before zapping in with xxxSux or xxxRocks.

    But there's a more fundamental problem going on, god knows what it is but maybe you're right - maybe I'm back to usenet.

    alt.peeves anyone?

    Dave :(

    --
    I write a blog now, you should be afraid.
  50. Re:Poorly written code == slow by Stu+Charlton · · Score: 1

    Since each iteration in smalltalk's do: statement is actually just executing a block (i.e. anonymous inner class), it's effectively a method call. So, you just have it return.

    --
    -Stu
  51. I kicked that monkey's ass by SEAL · · Score: 1

    Sadly enough, I'm dead serious. That damn thing taunting me over and over. I couldn't take it anymore. I went to that site with a vengeance and whooped his ass first try.

    I now have a nice treeloot.com stuffed monkey, complete with boxing gloves, sitting on top of one of my speakers at work. Yes I feel better now :-)

  52. Wheel mice in next update by harmonica · · Score: 2

    In this interview some Sun engineer says the next Java release will definitely support wheel mice with Swing. No word on how this release (1.4, 'Merlin') will be out, though.

  53. Re:Read last month's linux journal by nconway · · Score: 1
    That benchmark is shamefully poorly done. It doesn't include IBM's 1.3.0 JDK (which is, after all, what this story is about) - on my system, IBM's JDK does that so-called 'benchmark' very fast. I don't want to shut down X et al to doublecheck, but IIRC, IBM 1.3.0 can do ~945 objects per ms on my Celeron 500, 128 MB RAM, Linux 2.4.0test7. Since that's a different kernel and really different hardware, it's obviously apples-to-oranges, but it should give you an idea how fast IBM's JDK is.

    Plus, the tests on Win32 are pretty meaningless because Win32's system timer is not precise enough to generate meaningful numbers when you use System.currentTimeMillis() . (AFAIK - someone correct me if I'm wrong)

    Bottom-line: Try IBM's JDK 1.3.0 . Failing that, try a better benchmark which tests other aspects of Java performance, not just how fast you can create objects. But most importantly, don't trust a benchmark for anything - test real-world, production code. That's pretty much the only way you'll get a real idea if Java is suitable for your needs or not.

  54. Is it just me? by be-fan · · Score: 3

    Okay, I can understand being happy when something like NVIDIA's OpenGL (which is very Windows oriented) performs nearly as well on Linux. However, does Linux Java being slower than Win32 Java "rock?"

    --
    A deep unwavering belief is a sure sign you're missing something...
  55. Re:JDKs by Anonymous Coward · · Score: 1

    Is it about the companies who got together to actually agree on something. Is it the marketing people read and propigate without knowing what it really means.

    It's partly marketing, but it's also the great number of premade classes to make most things simple. From decent string-handling, to ease in writing GUIs (Swing or the old AWT), to simple and powerful server programs (servlets). Portability is something that adds to the combined total of all that. You're writing for a virtual machine, which means that you have the choice of writing on the same platform everyone else is, regardless of the computer platform the program's running on. That in fact is what Sun is using legal force to ensure.

    If you're willing to pay a good bit, the documentation is very good, and the online JavaDocs are a good substitute. Many books are free at http://java.sun.com/docs . The hole in documentation is in the servlets; you're pretty much looking at O'Reilly for that.

    Syntax is passable and reasonable. If you really care about semantics, use Scheme or something. No one really complains (in real life) that Java imposes OOP on the programmer; it's trivial to stick everything in a public class and make everything static. I've certainly done it for very tight apps.

  56. Because people cannot resist hype by Ars-Fartsica · · Score: 1
    Java is the first programming language to be marketed like a consumer product. It shows. Look at all of the suckers it has yanked it.

    It really goes to show how few coders really know that much about their tools and why they use them.

    1. Re:Because people cannot resist hype by jonabbey · · Score: 2

      And what is your experience with Java, please? I've spent almost the last five years developing a significantly large scale Java app, and it is very very good for what I need from it. You may not have a need for a secure, portable, high level programming environment with decent performance and easy programming, but there are a lot of us who do and have found it in Java.

      It would take a moron to decide that Java or anything else is the perfect answer to everything, but to declare people suckers for saying 'hey, Java is really some pretty nice stuff and I get a lot of benefits from programming in it' is insulting and pretty close to zero content.

    2. Re:Because people cannot resist hype by Ars-Fartsica · · Score: 2
      And what is your experience with Java, please?

      Heavy use since 0.9.

      Most of the time very frustrating - trying to use the various incarantions of AWT/Swing/whatever.

      On the server side, some serious data mangling and networking (perl/C++ destroys it in this repsect).

      Its a solution looking for a problem.

    3. Re:Because people cannot resist hype by jonabbey · · Score: 2

      It's not a solution looking for a problem, it's just not a solution to every problem.

      If you're looking to build a GUI app on a single platform, Java isn't going to give you the best results. If you're looking for a server app to do text processing or data reduction, Java isn't going to give you the best results. If you're looking to build a TCP/IP server, Java may make it easy to do, but its lack of a select()-type call or asynchronous i/o means that Java today isn't going to give you nearly the best results.

      But, if you're looking to build a portable distributed application with graphics and interactivity beyond the web browser, with lots and lots of classes, many thousands of objects, tons of concurrent threads and a nearly transparent networking layer for distributed object calls, and you want to be able to leverage as much reliable, pre-written classes as possible, Java is just the thing.

  57. enough being said, /. is a strong pro-Java forum. by cyberwinds · · Score: 1

    :) PERIOD

    --
    Together, we are strong; Apart, we are stronger.
  58. Re:Read last month's linux journal by hirschm · · Score: 1

    I'm the author of the "Java on Linux" article in the August Issue of Linux-Journal. Please note that I never claimed this benchmark to be "rigorous" or "complete" -- because it isn't. All it is is a simple benchmark to measure the performance of Java programs in terms of how many objects can be created, used, and discarded in a given amount of time. I believe this is fairly typical behaviour for OO programs, but, it does in no way justice to all aspects of a Java implementation (such as JDBC, Java 2D, Swing, etc.). In fact, no single benchmark could do this.

    Quite a few people sent me e-mail with comments, suggestions, and criticism. I prepared a summary to these questions and mailed it to the authors. I'd like to post the summary to this discussion group as well, since many of the questions and objections turn up here too.

    So here it is....

    REPLY TO LINUX-JOURNAL ARTICLE ON JAVA IMPLEMENTATIONS
    ================================================ ======

    1. GENERAL

    1.1 IBM JDK 1.3
    At the time I wrote the article, the IBM JDK 1.3 was not available
    yet for Linux and therfore it wasn't in the original article.
    When it was released, I immediately ran the benchmark again
    and obtained the best results I have ever seen on Linux. I sent
    a short summary with the results to LJ and asked if they could
    add a "last minute news" box with the results to the end of the
    article.
    Well, the LJ editors decided to place the IBM JDK 1.3 results in
    the introduction section of the article, where they are a bit
    out of place.

    1.2 Article Headline: "The Java interpreter on Windows is faster than
    the fastes JIT available on Linux..."
    This headline was selected by the LJ editors, not by myself.
    After running the benchmark with the IBM JDK 1.3, it is actually
    no longer true, but I wasn't able to rewrite the article in the
    short time after IBMs JDK 1.3 became avaible and before the
    article went to press.

    1.3 Borland Delphi
    Someone pointed out that Delphi would be simpler than Java
    and as efficient as C. I'm not familiar with Delphi, so I cannot
    comment on this. However, as far as I know, there are no open
    source implementations of Delphi, so at least for me it's not
    a candidate for the open source programming language I mentioned
    casually at the end of the article.

    1.4 Why was Tower/J not included in the benchmark ?
    Tower/J is a commercial product. Although they do provide
    evaluation licenses, you have to justify _why_ you want one.
    Since I was unsure if doing a simple benchmark for LJ would
    be justification enough, I didn't bother to ask.

    2. QUALITY OF THE JAVA BENCHMARK

    2.1 The benchmark is not indicative for real world Java applications.
    Yes, this is true. No single benchmark can do justice to all
    aspects of a Java implementations, so I picked something very
    simple (ie. creating objects and calling methods on them) which
    _all_ programs do (well, at least all reasonable OO programs).

    2.2 Flyweight Pattern
    Someone pointed out that applying the flyweight pattern would
    improve the performance of the code by a factor of 5. This is
    certainly true, since flyweight eliminates the overhead of
    creating 500k objects by using just one object and associated
    IDs. I agree that this is what every sensible software engineer
    should use in a real world program of production quality.
    However, the intent of the benchmark was to compare the relative
    performance of different Java implementation on Linux in terms
    of "how much does creating an object cost ?", so saving on the
    number of objects to be created wasn't an option.

    3. THE C++ BENCHMARK

    3.1 Why is there such a big difference in performance between compiled
    C++ code and compiled Java code ?
    I'm not a compiler implementer (ask Per Bothner of Cygnus Support,
    he would probably know), but I think that the overhead for garbage
    collection and synchronization mechanisms for multithreading are
    likely explanations.

    3.2 C++ Optimization
    I didn't use any optimizations when compiling the C++ program,
    because I didn't use any on the Java benchmark either.

    3.3 By reference vs. by value semantics
    Someone pointed out that replacing "ptarr" (which is an array
    of pointers to "PerfTest" objects) with an array of "PerfTest"
    objects will result in a 20 fold performance improvement.
    I can believe this, since it eliminates 500k calls to "new
    PerfTest".
    However, this is not the point, since Java has no comparable
    mechanisms
    for this. In Java, all objects have "by reference" semantics, there
    is no "by value" semantic for objects. This is one of the reasons
    why Java is simpler than C++ (and also why it's slower than C++ ;-)
    )

    3.4 Missing "#include" statements
    The #includes at the beginning of the C++ program (listing 2)
    should
    read like this:
    #include
    #include
    #include
    Since I sent the original article in HTML format to LJ,
    their HTML converter probaly ate the includes, thinking
    they were some kind of obscure markup tags.

  59. Re:Read last month's linux journal by nconway · · Score: 1

    If you took offence at my comment, I apologize. It's clear that you understand the scope and limitations of your benchmark, even if the person I was replying to did not. Are you planning any followup Java on Linux articles in the future?

  60. Please, no more articles about benchmarks by davidb54 · · Score: 2
    Benchmarks are hardly "stuff that matters". Benchmarking Java is a waste of time and I do not understand why this is considered news. Is it really such a big deal that Java is faster than it used to be? Java has been fast enough for web applications for a long time (all it has to do is be more or less equivalent to Perl, which isn't such a big deal considering that both are interpreted languages). People who decide to use Java don't do so because it's fast. They do so because they like Java, for whatever reason.

    I am tired of benchmarks. I am tired of hearing about MySQL vs Postgres, Apache vs IIS, etc. That sort of benchmarking is not worthy of discussion and Slashdot should understand this by now. Hey. If Ingo Molnar writes a kernel-space web server which will be available in upcoming Linux distributions, that's interesting and that's news. But please. Please. PLEASE stop with all of these useless benchmarks. All they do is provoke people and lead to endless arguments about nothing at all.

    Dave Bailey

    1. Re:Please, no more articles about benchmarks by Mike+Connell · · Score: 1

      To be honest he was basically right. Any modern JVM is compiling the code on the fly, and then running the machine instructions, not interpreting the bytecode. Whilst the JVM is still conceptually a bytecode interpreter, in effect it is doing little interpreting, spending most of it's time as a JIT compiler and then executing the resultant code.

      When you said:

      > The JVM takes instructions for its "architecture" and *interprets* them to the native architecture

      It was almost exactly right, if you replace the word "*interprets*", with "compiles". You dont "interpret to" an architecture, you 'compile for'. If you are interpretting then the underlying architecture is irrelevant - your program code (JVM) is executing the bytecode within your VM.

      Hope this helps
      best wishes,
      Mike.
      ps) IOW, Java is not interpreted. In fact it is not merely compiled once, but twice!

  61. So, about Java on LINUX... by rkent · · Score: 1
    Um, is it just me, or did that benchmark have nothing to do with Linux? You'll notice that little "test conditions" section at the bottom, which says the test platform was Win2000 running on a souped-up intel box.

    Basically, there was a little blurb under "Conclusions" that said "Oh yeah, it's fast on Linux too, and sometimes faster." Whee! But this benchmark was not meant to compare java across platforms, and didn't even run anything on Linux.

  62. Java/Linux Milestone by small_dick · · Score: 2

    If the app runs for more than 5 minutes without crashing, version 1.0, baby.

    --


    Treatment, not tyranny. End the drug war and free our American POWs.
    See my user info for links.
  63. On Java's Slowness by Osvaldo+Doederlein · · Score: 1

    Java is not slow; Java has some slow spots, which is different -- it affects you depending on the job. For example, Java has no select() yet so you're forced to have one thread per simultaneous connection in servers (very bad). Java2D's implementation sucks too, because it doesn't use available HW acceleration. Some libraries can be improved. And the JVM comes with a price in memory.

    On the other hand, the server-side-JSP-based-app-including-our-own-CORBA- security-and-object-persistency-services that I wrote recently just rocks (but that's because we're not into the 1000's of users).

  64. Re:Java Rocks on Linux? by v4mpyr · · Score: 2

    According to http://members.ping.at/theofilu/netsc ape.html, Netscape gets its problems from memory management functions (big surprise there) in the the libc.so.x.x.x library. I'm trying the fix recommended on that page, sounds like it might help clear up the other Java problems.

  65. Re:So why no JVM in Mozilla? by Bj�rn · · Score: 1

    Could it be that JDK/JRE v1.3 for Linux has not been released by SUN for Linux yet?

    --
    Never express yourself more clearly than you are able to think. --Niels Bohr
  66. Graphics performance [Re:Thoughts from a Java shop by Anonymous Coward · · Score: 1

    the graphics issues are simply a matter of LinuxJava accessing the hardware directly.

    No. A better design is to have a rendering extension in the X server that knows everything about the hardware, and a Java library that just calls this extension. Trust me, you don't want your JDK's libraries to know about the difference between a G200 and a G400.

    Currently, X11 rendering is inadequate for Java, and e.g. Java2D does all its rasterisation client-side and blits it to the X server.

    There is a lot of XFree86-related work aiming to develop rendering extensions:

  67. Re:Read last month's linux journal by woggo · · Score: 4
    There isn't anything "rigorous" about Hirsch's "set of benchmarks", nor can you call it a "set" without qualifying; it was a "singleton set". He simply populated an array (in one for loop) with a half-million lightweight objects and then accessed those objects twice (in separate for loops). Just because he tested it with several JVMs doesn't make it a rigorous test.

    Not only is this not representative of most real-world programming tasks (it checks the gc and allocation code more than anything), but he didn't perform simple optimizations that would have helped him big-time (like loop unrolling). He also apparently didn't read the gcj docs, which point out that gcj's bounds checking is much slower than it should be, so if you don't need it, you can turn it off. Since he does 1.5 million array accesses and does all the bounds checking himself with loop termination invariants, bounds checking is a fairly important -- and unnecessary -- constant multiplier, I'd say. :-)


    ~wog

  68. hardware time is cheaper than programmer time by woggo · · Score: 5
    Good points, mac.

    What a lot of people fail to realize is that a lot of "java performance problems" are caused by sub-par java programmers who don't understand how costly some operations are. Another entire class of performance problems are caused by bad algorithms. An O(n) algorithm coded in QuickBasic will outperform an O(n^2) algorithm hand-coded in assembly language for most possible inputs.

    OK, so all things being equal, using smart algorithms, and not abusing the language, java is still a bit slower than C. Big deal! In most cases, it doesn't matter. Server-side apps are blocking on I/O most of the time anyway; client-side apps are blocking on user interaction most of the time. For projects with hard real-time requirements, you have the RTJ standard; if you're really speed-hungry or are doing serious systems work, then you can write it in C.

    However, my employer could buy a middle-range Sun workstation for what he pays for my time in a week, and I'm a lot more productive in Java than I am in C. Furthermore, because I pay attention to engineering and design issues, other engineers can re-use and subclass my code without modifying it. If I've used good algorithms, avoided stepping on the GC, and steered clear of known performance problems (like the + operator for Strings and the unnecessarily synchronized Java 1 collection classes), then my code is probably fast enough. If it's not, then it's a lot cheaper for my boss to requisition a faster machine than it is for him to pay me for an extra two months to chase pointers and re-model object-oriented systems in procedural code.


    ~wog

    1. Re:hardware time is cheaper than programmer time by badmonkey · · Score: 1

      ok, i can see why its bad to use "+" in a loop now...
      thanks :)

    2. Re:hardware time is cheaper than programmer time by woggo · · Score: 1
      "like the + operator for Strings" Except that modern VM's will account for this. Look at the byte code sometime.

      I have, and they don't. Nice troll, though.


      ~wog

    3. Re:hardware time is cheaper than programmer time by am+2k · · Score: 1

      So what should I use instead of '+'?
      String.concat()? Does this make any difference?

    4. Re:hardware time is cheaper than programmer time by badmonkey · · Score: 1
      about the plus operator, it is no slower than say using string buffers, because it compiles to the same code (see below)
      how do you concatenate strings? or do you just use char[] for everything like a C programmer?
      from the JDK:
      String buffers are used by the compiler to implement the binary string concatenation operator +. For example, the code: x = "a" + 4 + "c" is compiled to the equivalent of: x = new StringBuffer().append("a").append(4).append
    5. Re:hardware time is cheaper than programmer time by am+2k · · Score: 1
      Thanks! Maybe some day my java apps will run so fast I can actually use them on my g3/300 ;-)

      Remembers me on my old pascal/assembler days, when I actually counted processor cycles and optimized until my code was totally unreadable (but very fast on my 386DX25).
      This was the only way to go. *sniff* I think they're back with Java! ;-)

    6. Re:hardware time is cheaper than programmer time by Yokaze · · Score: 1

      I agree with you mostly.
      Good coding outweights language.
      A faster machine can take care of the factor before O(x).

      But...

      simple-sorting algorithms work O(n^2)
      quick-sort, merge-sort (name your favourite) sort
      in O(n log n), IRC.

      So don't use the first ones, the factor is
      irrelevant.

      Ummhh...

      The O-notation is only asymptomatical.

      For an end-user application which deals with
      say 200 entries (e.g. in his email client), it's asympomatical sorting behaviour is totally irrelevant.

      So the factor can be quite critical, especially in an end-user-enviroment, where the application has to respond fast or the user dislikes the application.

      --
      "Between strong and weak, between rich and poor [...], it is freedom which oppresses and the law which sets free"
  69. Yes that's a typo by Osvaldo+Doederlein · · Score: 1

    This is a common error for me -- "teste" means "test" in Portuguese (which is my native language), so I guess my language switch failed for just one milissecond. And I was not aware of any meaning for "teste" in English (my knowledge of slang is limited) but I can guess from the context. :-))

  70. Re:Obviously, you didn't research your argument. by (void+*)0x00000000UL · · Score: 1
    You will use the right tool for the right job. You don't have to use the same langage for everything.

    Want to write system level/embedded stuff. Use C or lower-level assembly or even lower level VHDL hardware description langage if you're crazy!

    Want to write networked apps/server stuff. Java rocks at this. If Java is too slow, buy a faster machine. Buying a 8000$ machine is nothing compared to paying four programmers four more weeks to do the same in C on a 3000$ machine.

    Obviously, you'll learn that in engineering, there are a lot more considerations than technical stuff.

  71. I am just waiting for Linux 2.4.0 + XFree 4 by Osvaldo+Doederlein · · Score: 1

    ...although I guess the JDK still needs to be updated to use XFree4's DGA. I hope Blackdown's 1.3.0beta is out soon, as they're more likely to be first with such optimizations.

    Anyway Linux 2.2 can be more scaleable, you only need to avoid native threads (like TowerJ does). OTOH, native threads are good with many CPUs. An implementation that uses multiple native threads, but can multiplex many Java threads per native thread, is probably the best.

  72. Re:Read last month's linux journal by Osvaldo+Doederlein · · Score: 1

    Thanks for the tip, I will try to find this edition of LJ.

    On the "collective IQ" of the Lobby, well, at least we don't have every single thread beginning with "FIRST POST!!" messages :) Now serious - any advocacy group will have some excesses, some people on a jihad, some kids pretending to be experts. And not being myself a Linux (or any OS's) advocate, I frequently read in /. too much BS written by pro-Linux zealots. One always needs to filter. As a long-time member of the JL, I already know the frequent posters so I can focus in the good posts and ignore the noise (unfortunately we miss something like /.'s moderation).

  73. VM's and User interfaces by tomma · · Score: 1

    I've been using IBM's JVM for linux for a while now, and I must admit that it's pretty fast. The blackdown ports definitely can't beat it. What bothers me though is the graphical implementations of most VM's: awt and swing. I've been running a development tool which is implemented in Java mainly using Swing. The main problem is that it runs perfectly with SUN's VM in Windows NT 4.0. I've tried to run it in Linux using IBM's VM, but that was a disaster: the user interface was slow, stops responding at strange times, and eventually the entire application crashes (don't ask me if the application crashed or the VM crashed, I am not sure anymore). If I don't run graphical applications (usually the ones I write myself :)) I don't have any problems. In fact I was very pleased with the performance of that IBM's VM. To me, a VM implementation for linux will only deserve the adverb 'rocking' if it has IBM's speed and Sun's stability (when it comes to graphics)

  74. Dumbass moderators, again (was Re:I give up.) by davie · · Score: 2

    Add to my list of complaints that dumbass moderators, who have knocked my original post from a +2 to 0 with several "offtopic" mods (shrinking my karma in the process, of course), have seen fit to give MrBogus' post a rating of +4, even though it appears in a thread underneath my post and deals with the same material, which is supposedly offtopic.

    You can't have it both ways, meatheads.

    --
    slashdot broke my sig
  75. Re:I give up. by davie · · Score: 2
    So there's too many people Karma Whoring for 5s and your solution is to raise the bar to 10? Why? To seperate the truelygood whores from the mediocre ones?

    I understood the poster's comment to mean that moderators should be given ten moderation points to work with, not that posts should enjoy an upper limit of ten points.

    The problem is not the posts that get moderated up, it's the posts that don't and the moderators that blow their load on the first 30 posts.

    There should be no negative moderation, it's pointless. Start all posts at zero by default, adding a point or two for merits, then allow the good posts to accumulate positive moderation points.

    "Yeah, but what about crappy posts that get moderated up?" Get a clue. A post might get one or two mods you think it doesn't deserve, but if four or five moderators think the post merits a bump, that's a pretty good indication that it deserves the increased exposure.

    --
    slashdot broke my sig
  76. Re:slow news day, huh? by Enahs · · Score: 1

    Erm, idiot, if you don't like the Linux bias, go somewhere else.

    I've been reading Slashdot since day one. I found out about Slashdot while looking for AfterStep applets for my Linux box. Yeah, it has a Linux bias. Get over it!

    --
    Stating on Slashdot that I like cheese since 1997.
  77. Java strong at the server, weak at the client by claes · · Score: 5
    As a professional Java developer for a little more than 2 years, I have to say that Java has still a some way to go for client applications. Swing is still too slow, and garbage collection makes the GUI to freeze every now and then. Also, the Windows Look and Feel is not very windowish. For example, wheel mice are not yet supported by Swing, and this has been very problematic for us as our customers where used to use the wheel, and had a very hard time to accept it stopped working when we switched from AWT to Swing.

    On the server side it is different. Java is a very nice language to develop in. The class library is HUGE and having the flexibility to support several platforms at the server is very good and something we surely will take advantage of in the future. It seems to be easier to optimize server side JVMs also.

    Java is here to stay, especially at the server. Those who flame Java for its weak points (small client applications) should look closer on the areas where it rocks, before discarding the language as a whole.

  78. Re:Read last month's linux journal by Fross · · Score: 2

    It isn't pretty. All of the Windows solutions beat all of the linux solutions, inlcuding gcj.

    Java may be adequate on linux, but I really don't know how you could conclude that it "rocks".


    The article actually concludes with this very point, in fact, something along the lines of "The Linux JVM is almost as fast as its Win32 counterpart".

    What's impressive for the Linux side is how far it's progressed lately - support for 1.3 will help an awful lot. The main cause for difference in speed is the amount of time Java has been available and the amount of time spent improving it on each platform - years for Win32, almost none so far for Linux.

    I don't quite get the "rocks" part myself either, but it's a definite improvement :)

    Fross

  79. Re:So why no JVM in Mozilla? by david@ecsd.com · · Score: 1
    It looks like the wheels are finally in motion: http://bugzilla.mozilla.org/show_bug.cgi?id=28461

    When java finally hits Mozilla, I'll wipe Netscape from my disk drive.

  80. what about kaffe's commercial version? by Anonymous Coward · · Score: 1

    Figures don't lie, but liars figure. Enough with the benchmarking! ibm gets to pound it's chest today, Sun tommorrow, and linux the day after that. Could we get some articles boasting specific implimentations, at least it would be an interesting read, instead of looking at bar graphs all the time which mean nothing in the real world. If I see one more benchmark i'm calling reno up!

  81. You Used The Wrong Tools For The Job by Carnage4Life · · Score: 3

    Saying that Java is hype because you used it to write software which is not its core competency is an instance of a poor worksman blaming his tools

    Java's GUI API will always be slower than Native GUI toolkits. In most instances if the app is complex then it'll be almost unusably slow. Heck, even Sun has canned most of its Java GUI tools because they became unusable the larger they became.

    Perl is the king of text processing languages (no contest) and C++ gives more fine grained control of sockets than Java.

    Now for medium to large scale, cross platform, multithreaded, easily extensible, middleware applications that will need little or no maintainance but are easily maintenable, Java(TM) cannot be beat.

    PS: Your rant is similar to someone bitching that C sucks because it is poor at text processing even though C was designed as a portable assembly language.
    The Queue Principle

    1. Re:You Used The Wrong Tools For The Job by hoquaim · · Score: 1

      "The popularity of programming languages and other technologies has next to nothing to do with technical considerations and everything to do with the same instinct that makes 13-year-old girls decide they all like Britney Spears simultaneously."

      Damn that's good! Right-on. That makes it into my awesome-quotes file.

  82. Not surprising at all... by WombatControl · · Score: 2

    First of all, IBM has done more with Java than Sun... one of the first useful Java applications I ever tried was their Java IRC client, which did everything an IRC client should. If anyone was going to do a quality Java implementation, the people at the IBM alphaworks would be the ones.

    Also, one shouldn't dismiss the Open Source contribution to this. Having the ability to examine the kernel source in detail makes it that much easier to tailor your Java implementation so that it best integrates with the kernel. With the highly closed nature of Windows, developers have to guess how to best integrate with the complex APIs and SDKs of Windows.

    Java may actually take off only about four years after it was supposed to be The Next Big Thing in programming languages. With APIs like Jini and Personal Java, Java may actually find a niche in PDAs and Internet Appliances...

    1. Re:Not surprising at all... by perfecto · · Score: 1
      Why isn't sun doing this stuff?

      and end up with another microsoft that screws its partners by changing the spec so their products can get to market first? NO THANK YOU! i like it better this way. i'm glad that sun is letting companies that can do it better do it. i use jikes almost exclusively. i use jserv and gnujsp for servlets and am now evaluating caucho. i love the amount of choice i have and the idea that if i change app servers, i don't have to change much code. this is the way it should be!



      --
      And Justice for None

    2. Re:Not surprising at all... by Malcontent · · Score: 2
      It also occurs to me that the only company which makes quality usable client side java apps is Oracle. Just about every single one of their client side apps is written in Java including the installer.
      Why isn't sun doing this stuff?

      A Dick and a Bush .. You know somebody's gonna get screwed.

      --

      War is necrophilia.

    3. Re:Not surprising at all... by slaughts · · Score: 1

      Actually, Veritas has Java-based interfaces for most of their products, including Volume Manager and NetBackup, although I wouldn't call them snappy. And most of Sun's new products include a Java-based installer. Look at Forte Developer 6 for an example...

  83. Re:Open Source Java? by bmeist · · Score: 2

    I've been running the blackdown jdk in a production environment for over a year now. It has been nothing but stable and seems pretty fast. I did try out the IBM jdk 1.3 and was very impressed... until I ran apache bench. It crashed within seconds of a 100 concurrent user test that I run with no problems on blackdown. Has anyone else seen this? It's a new port, so I will try back with the next release.

  84. JDKs by pauldy · · Score: 1

    I think it is interesting how far java has come but am I the only one who fails to see what all the hopla is about. Is it about the companies who got together to actually agree on something. Is it the marketing people read and propigate without knowing what it really means. Someone please enlighten me. Please not some fanatic who is on the bangwagon just to be a part of something, just someone who knows the true importance of it and can explain it without telling me it runs on a lot of platforms.

  85. Re:Open Source Java? by grappler · · Score: 2
    correction: public companies have to act in the best interests of the shareholders.

    "What a waste it is to lose one's mind. Or not to have a mind is being very wasteful. How true that is"

    --
    Vidi, Vici, Veni
  86. Which JVMs? by ChrisWong · · Score: 1

    It would help if you would specify which JVMs you were talking about. Otherwise, you experience may no longer be relevant. Under Linux, our full-blown options include Blackdown's JDK 1.2.2 port, Sun's JDK 1.2.2 with Borland JIT, Sun's JDK 1.3 with Hotspot and IBM's JDK 1.3 with IBM JIT. The posting was primarily about IBM's JDK.

    I don't think GCJ is very usable right now. It is probably not appropriate to extrapolate from the performance of a very immature compiler to make assumptions about more mainstream and mature JVM solutions.

  87. Re:I give up. by MrBogus · · Score: 2

    So there's too many people Karma Whoring for 5s and your solution is to raise the bar to 10? Why? To seperate the truely good whores from the mediocre ones? The problem is not the posts that get moderated up, it's the posts that don't and the moderators that blow their load on the first 30 posts.

    In my book, we need more negative moderation and less positive moderation. I'd be perfectly happy with a maximum of 3 if you could moderate people down for reasons such as "Stupid", "Wrong", "Waste of Bandwidth", "Bitchy Old Timer", "Karma Whore", "Didn't Read the Article", "Advocacy Post" and "Take it to sid=Moderation".

    --

    When I hear the word 'innovation', I reach for my pistol.
  88. Java Rocks on Linux? by v4mpyr · · Score: 1

    Strange... I've had nothing but problems with Java on Linux, no matter what version I try to run it always has a tendancy to hang up. The only success I've had is running Java in Linux apps on top of Solaris. Check out lxrun for more details. :-)

    Btw I run RedHat 6.2. Does anyone have any idea why it has such a hard time with Java apps in general? (Besides Netscape)

    1. Re:Java Rocks on Linux? by Siderean · · Score: 1

      I use Sun's Java 1.2.2 on RedHat Linux 6.2 and don't have any problems. I write web applications (servlets, beans and JSPs) and the application is quite sophisticated (50 business objects, 64 tables/400 fields in the database, over 110 java objects total all done in a MVC design pattern). The app was quick to write, easy to model and other developers find it very easy to learn.

  89. benchmarks "not dated" by Anonymous Coward · · Score: 2

    Not dated, but must be at most a couple of weeks old.
    Apparently Emmet never heard of the "view page info" command. The pages state:

    Last Modified: Sun, Aug 6, 2000 2:59:48 AM GMT
  90. Re:Thoughts from a Java shop by java.bean · · Score: 2

    I'll second this. We had unacceptable performance with the Java 2 JDK that comes straight from Sun. If you're going to do Java on Linux, use the Blackdown JDK. As a bonus, the Blackdown JDK far outperforms the Windows JDK as well (at least for server apps, we don't do any GUI development).

    --jb
  91. Is Intel/x86 the only h/w platform? by Jon_E · · Score: 1
    while a good set of test results, what about performance on a sparc? with the IA-64 in the works for later this year, I think some of the work that sun has been doing for the past 5 years (Ultra-sparc = 64bit) will finally be evident .. and with the Ultra III due out by the end of the year (hopefully), we should see major improvements in the architecture.

    keep in mind that Sun has always had a different approach to hardware and this is apparent in their software .. personally I find it impressive that they are able to maintain a good presence in the Intel market while producing their own (better) hardware all along. puts companies like apple to shame. their focus on interoperability, research, and development has undone most of the proprietary obstacles that have persisted since the mid-80s.

    my biggest beef with the linux community is the lack of real innovation. ok so sun doesn't give everything away for free .. go write your own language .. develop your own ideas that are fundamentally different and stop copying everybody else .. imitation becomes the highest form of flattery.

  92. Re:Read last month's linux journal by lgraba · · Score: 3

    "Javalobby stats should not be trusted - my experience is that Javalobby has the lowest collective IQ of any community tech site on the web, and their articles are typically mindless advocacy with no useful data."

    Funny, that's just what they say on JavaLobby about Slashdot ;)

  93. Re:I give up. by Paradise_Pete · · Score: 1

    Moderating down an AC post should be less expensive, perhaps free, to the moderator (if the AC post has not been previously modded up.)

  94. Open Source Java? by nconway · · Score: 3
    While Sun open sourcing Java might seem outlandish, I'd say it's a definate possibility. Sun has GPL'd StarOffice, and is a member of the GNOME foundation. I think the bottom line is that if Sun clearly understands it would be in their best interests to open source Java, they'll do it. After all, they're a public company like any other - they have to obey the will of the consumer. OSS currently has a mindshare among developers that can't be easily ignored.

    The survey is here, go and vote. Recently, a petition was put forward to open source javadoc (the Java sourcecode documentation tool), but Sun hasn't responded (possibly due to lack of attention from the media). I think if we really bug Sun about this, we might get an official response (*fingers crossed*).

    As to the topic at hand, my primary Linux JDK for development is IBM's. It's excellent, and very fast - I haven't had any problems. Sun's 1.3.0 JDK hasn't even been officially released for Linux or Solaris yet, so there's not really much of an alternative at the moment.

    1. Re:Open Source Java? by bmeist · · Score: 1

      I believe it was the pre-release version of 1.3.0. I will give the final release a shot.

  95. So why no JVM in Mozilla? by gruntvald · · Score: 1

    Just what is the problem with getting a JVM into Mozilla on Linux. The rest of it is pretty pleasant (at least, the nightly builds are), and I can understand the lack of encryption, but no JVM? C'mon, I switched all my stuff to css, and it renders wonderfully in ie on windows and m17 on Linux, but I have to dip back into communicator if I want to visit anything with an applet. Bah!

  96. Re:I give up. by Ded+Bob · · Score: 1

    Time to go back to Usenet. I am thinking about it as well.

  97. audio sucks anyway by ActionListener · · Score: 1
    This has been my experience as well, at least for client applications. I would really like to do my Java development on Linux rather than windows, but Java on Linux is not quite there yet. My work involes using the Java audio API (Java Sound). Unfortunately, simple audio suport is broken in IBM's Linux 1.3 JDK (incredibly choppy audio). I am sure IBM knows about this since even the audio demos in /opt/IBMJava2-13/demo/sound/ sound very choppy. The windows version of IBM's 1.3.0 JDK has a wonderfull implementation of Java Sound (much better than Sun's), however. I will reluctantly continue my development on windows for now...

    How can one say that Java on Linux "rocks" when something as basic as simple audio support is not usable? Please note that I am only ranting about client-side use of Java here. It might be that Java "rocks" on Linux as long as you are only using it for server-side stuff, which is probably what most people will use it for anyway...

  98. Poorly written code == slow by KidSock · · Score: 1

    After seeing a few posts about how slow Java is I must inform you that Java is not meant to be fast. It is just very good as a programming language and correctness is paramount to speed. It's object oriented functionality is basically unparalleled in the industry. It is much easier to write programs that take advantage of OO constructs than all other OO languages(if you think Smalltalk or something else is just as good or better I'd like to hear your arguments). Sure C++ and many other languages have these features but in practice is has been proven that most people don't know how to use them properly so brings more programmers closer to the far superior OO world.

    This is where the problem lies. I would guesstimate that 9 out of 10 coders using an OO language don't really understand OO principles. They might claim to understand, but in reality their code is modular at best. If you have one well designed high level OO construct, your program it will be more that 2x better(I know you probably don't see why but this is a VERY BIG deal).

    If one person with great OO skills writes the high level design the 9 other coders can work happily writing their "pseudOO" code and you can still end up with a good application. If they really screw up their little piece you can very easily replace it because the OO abstractions prevent these mistakes from transcending the system.

    A well written Java app can be quite fast too. It's the many VB programmers who jumped on the Java bandwagon and use IDEs, misconfigured application servers, producing what they think is good code that give Java a bad wrap.

    KidSock

  99. Re:Thoughts from a Java shop by Zurk · · Score: 2

    suns JDK on linux sucks rocks. it tends to lock up under heavy loads. i've personally observed this several times. blackdowns 1.2.2FCS works as well as suns JVMs on solaris do. note that most JVMs are better off with a max of 125 threads/JVM. of course with java multiprocessing/mutlithreading is built into the language from the ground up and as a general rule i run at least 4 independent JVMs per machine (500 concurrent users) for decent performance.

  100. Java on Solaris, Windows and IBM by joe_fish · · Score: 2
    If we consider release timeliness as a way to compare different Java base platforms the news for Sun is very poor.

    Order in which JDK 1.3 is/will be released for various platforms:

    • Windows (out now)
    • Linux (out now)
    • AIX (out now)
    • OS/390 (out now)
    • Solaris (real soon now)

    Has to be a tad embarrasing for Sun!

    --

  101. Thoughts from a Java shop by Anonymous Coward · · Score: 2
    I used to work for a Java shop, and, well, they were no fans of Linux. They tried Linux and found Linux unstable, and that Linux had less-than-ideal performance.

    It was one of the few places I worked at that had an active hostility towards Linux. Needless to say, I no longer work there.

    Looking at these benchmarks, I do not think I would be able to convince any of my ex-co-workers that Linux is ready for heacy-duty Java yet.

    I note that Java on Linux has caught up in a number of ways, but still has a way to go with:

    • Scalability
    • Graphics performance
    The scalibility issues should be much less of an issue when the 2.4.x kernel comes out (knock on wood), and the graphics issues are simply a matter of LinuxJava accessing the hardware directly.

    Anonymous so my ex-employer doesn't get on my case for breaking any NDA I may have signed

  102. Java = No advanatge, Delphi for Linux = Rocks by thomas+jaeger · · Score: 1

    Who the hell cares about cross platform capability once IBM puts Linux on all of its hardware platforms as they have anounced? Just look at www.ibm.com/linux . I can kick JAVA's ass on Windows and soon on Linux with Delphi ( www.borland.com/delphi ). Who the hell needs JAVA when you can create raw, powerful, nativley compiled exe's in Delphi for Windows and soon in Linux? There is NOTHING you do in JAVA that you can not do in Delphi. If so, please show me. Who the hell needs JAVA when you can create "native" Apache modules nativley compiled in Delphi for Linux? JAVA is childsplay, get serious and learn a real language like Delphi. Those wannabe programmers that use JAVA are a joke. There is always a need for speed. Period. No matter how fast your CPU is. Got that? With Delphi for Windows and Linux and possibly Apple and other platforms, who the hell wants JAVA crawling along as pathetic as JAVA is? And, raw speed is only one of MANY great features of Delphi (OO Pascal). God I hat this Java crap. Just like when VB for Win came out back in 1991. Give a man a toy, he plays with it. Give a man the best tool, he starts producing reliable, stable, and fast products and services. Grow up people, smell the coffee or something, just WAKE UP!!!

    1. Re:Java = No advanatge, Delphi for Linux = Rocks by JohnnyCannuk · · Score: 2

      Let me see If I got this right...don't use Java (pure OO), use Pascal (Delphi by any other name...). And you're telling ME to grow up?

      Try going below to read some of the other, more well thought out comments before you spout idiotic nonsense.

      Would I use java to create a graphic-intensive, Windows only exe? No that's not what the tool is for. Would I use it to create a thread-safe, cross-platform networked servlet? Now your talking.

      About 10-15 years ago many people were saying the same thing about some upstart, slow, bloated language called C++. I guess we know what happened to that.

      --
      Never by hatred has hatred been appeased, only by kindness - the Buddha
  103. Re:Obviously, you didn't research your argument. by iapetus · · Score: 1

    I have 100% proof that you're wrong. I once saw a C++ program which was slow and buggy to an even greater extent. Therefore C++ sucks more than Java. QED.

    Do you see the gaping hole in your logic yet?

    --
    ++ Say to Elrond "Hello.".
    Elrond says "No.". Elrond gives you some lunch.
  104. In defense of Python and Perl by Jason+Earl · · Score: 2

    People don't complain about the execution speed of Python or Perl because nobody touts either Python or Perl as being fast. When you are working with a scripting language you are optimizing your development time, not execution time.

    The Open Source community has long been skeptical of Java for many very good reasons. For example, as you yourself state many of the core Java libraries are painfully inefficient. Another problem with Java is that it has been touted from it's inception as a "Write Once Run Anywhere" language, and yet the Linux and BSD versions of Java have historically been late, buggy, and incomplete. In other words, Java has been a "Write Once, Run On Solaris Or Windows" language up until very recently. Perl and Python both work very well on the Free Unixes, and (speaking as someone who tried Java first) generally performed as well or nearly as well as the more complicated Java. For example, Perl will completely destroy Java if the task includes a lot of text manipulation. And comparing a GUI written in Python/Tkinter (or better yet wxPython) to a GUI written in Swing is ridiculous (or has been until recently on the free Unixes). The Python GUI would almost certainly use less memory, and be more responsive.

    The killer has been that Java has historically had all the speed of an interpretted language and all the complexity of C++, hardly a compelling combination. This is just starting to change, but it will be some time before Java loses its stigma. In the meantime the hackers that have chosen Perl or Python have very little reason to switch. They are, by in large, quite happy with their choices. And it really isn't that hard to implement a solution in Python (or Perl) and then optimize the slow bits in C.

  105. joke by R2Q2+THE+GREAT · · Score: 1

    well thats java on the rocks

    --
    --this mesage will self distruct in five seconds--
  106. Re:I give up. by WasterDave · · Score: 1

    Truly beautiful man. Maybe part of the problem are the moderation guidelines which I believe encourage positive moderation rather than negative moderation. That and moderators cruising at +2 (something that I'm guilty of).

    I can't help feeling that the moderation points evaporating after three days doesn't help either. I'd rather save mine for a couple of weeks and give +1 to something *genuinely* insiteful (spell?).

    BTW, I have problems with that word. Does it mean "as in to shine a torch on a previously dark area", "sharing of insights", or more "insightment to riot".

    Anyway, I started this with the idea of adding to your list of negative moderations, but you seem to have pretty well covered the bases there.

    Dave :)

    --
    I write a blog now, you should be afraid.
  107. Its the 6th... by nash · · Score: 1

    BTW: According to HTTP headers the article was posted on the 6th of August.

  108. Java is the epitome of lag by AFCArchvile · · Score: 1

    Not convinced? Just look at that "Punch the monkey and win $20!" banner ad. That thing is Java. And it seems to run slower when you run it on a faster processor.

    Also, Quake III is partially Java powered (the main game code). However, it can also take DLLs (but John Carmack prefers QVM for its better file system security), and a group of hackers recently converted the main QVM files into DLLs. These run 20% faster than the QVM files, making mod developers wonder if they've done the wrong thing by learning QVM.

    --
    "Ancillary does not mean you get to rule the world." --U.S. Circuit Judge Harry Edwards, speaking to the FCC's lawyer
  109. Re:hardware time is cheaper - not true by woggo · · Score: 1

    If your "Java enterprise system" needed an E10K to run acceptably, then the "disservice to the programming profession" is the person who wrote it. Nowhere in my post do I advocate writing inefficent code. I do advocate using Java; you may be arguing that it is not up to the task. However, Java performs well enough for the vast majority of server-side development, and the gains reaped from using Java -- in reduced development time and reduced maintenance time (in the real world, other people have to understand and work on our code, too) vastly outweigh any minor performance losses.

  110. Wahhhh! Sob WAAAAHHHH!! by JohnnyCannuk · · Score: 2

    Wow, what a lot of whining here by the "java is too slow" crowd.

    The right tool for the job. Look at what you need to do. Look into ways to do it. Choose the way that is right for your situation. If that means using Java on Linux great! If it means ASP on NT, fine (insert anti-MS statement here).

    I'm currently using the 1.3 Java 2 SDK on an NT box for some development we are doing. The data access(JDBC) and networking (Servlets) works great - quite zippy, at least for our needs. The client (a custom applet) renders a little slow but we accept some slow rendering speed in order to get the peculiar UI our client wants (a round component with buttons that are pie wedges a la Trivial Pursuit pieces each one of which pops up a dynamically created menu with database data in it). We choose java because it was one of the few languages which allowed us to do all these disparate programming chores and keep the code clean and maintainable. We went from zero to prototype in 5 days.

    Now I'm sure we could have done this in a number of different ways (although we couldn't figure any others).

    The story was about how much the IBM JDK for Linux has improved in terms of speed, how it's almost ready to do graphic intensive stuff like desktop apps and such. If you really need that couple of extra milliseconds, use something else. Just stop whining about it.

    I personally don't like perl (my own opinion) but I don't go around slagging it - for some things its probably the best tool for the job.

    --
    Never by hatred has hatred been appeased, only by kindness - the Buddha
  111. Read last month's linux journal by Ars-Fartsica · · Score: 4
    A fairly rigorous set of benchmarks was performed by Michael Hirsch in the August 2000 issue of Linux Journal.

    It isn't pretty. All of the Windows solutions beat all of the linux solutions, inlcuding gcj.

    Java may be adequate on linux, but I really don't know how you could conclude that it "rocks".

    Javalobby stats should not be trusted - my experience is that Javalobby has the lowest collective IQ of any community tech site on the web, and their articles are typically mindless advocacy with no useful data.

  112. very large promo site runs entirely on java/linux by jason@mmi · · Score: 1

    We have a canadian specific promotional site running on a linux cluster (ultramonkey/LVS) We are running: ApacheJServ-1.1.2-1 IBMJava118-JRE-1.1.8-3.0 IBMJava118-SDK-1.1.8-3.0 and default apache install (1.3.12) of VA Linux 6.2(1?) All seems pretty stable, IBM has done a good job and Java on the server side is a very real, viable technology. While it may be slower than PHP (and others) it's still very viable (at least in my eyes, I make no claims that they are the same as my employers') Nearly the entire site is open source with the exception of a single macromedia director application.... (here comes the shameless plug), it's www.aztektrek.com check it out, win a new Aztek car from GM.