“We recently received an email asking for a ‘What Is Java‘ entry on the O’Reilly Network What Is site. Who could possibly not know what Java is in 2006? After ten years of books, websites, and conferences, doesn’t everyone know what Java is? Apparently not. After all, things have changed. For every dusty definition that speaks of applets and Just-In-Time compilers, there are new directions and new realities that have settled in, understood by many, yet not always completely documented.”
With all due respect, java is anything but “high-performance”.
I’ve noticed these performance lies going through the net and people happily being brainwashed but please.. the facts?
Fact: you can’t even run netbeans 5.0 on 1ghz machine with 256megs of ram.
Fact: Azareus turns on and off in 15 seconds on a 2Ghz athlon with 512megs of ram.
And many others.
True java has gone forward in the performance area but please never call it “high-performance”.
I don’t care that ackermann was faster than in C. I care for real life applications and requirements and quite frankly the gargantuan RAM requirements by any java app is horrid.
After all those improvements they put in I’m willing to call it “slightly sluggish” on my high-end machine.
Java is high performance. i can say it is pretty close to c-C++ applications, in most cases. You are mixing two things here, performance and resource use.
thing is, both azureus and netbeans are special purpose applications. Azureus posibly do a lot of network-disk related operations during the stratup and shutdown, also the nature of the bittorrent operations requires big and frequent memory/io operations. Plugins is another culprit i guess. i dont think it has something to do with Java itself. in fact, it is very possible to limit the heap memory of any java application. i believe Azureus would work fine with a 64M or 128M limited heap, actually you can give a try by compiling it by yourself and running it using -Xms64M -Xmx128M JVM parameters.
“You are mixing two things here, performance and resource use.”
Sorry, it IS one thing. If you have high resource use you can’t have “high performance”.
“I dont think it has something to do with Java itself.”
If you mean the language then no, it hasn’t got much with it. If you mean the framework then it has everything to do with it as crappy resource-eating libs and not-so-well performing VM is the cause.
The performance of Java tends to be a subjective matter.
Personally, I find it to be incredibly slow, but I also work on low level engine code in the game industry where time constaints are often measured in single digit milliseconds. In my case, the use of Java doesn’t even exist in the realm of possibilities.
On the other hand, if you’re running an average desktop application or serving up some corporate web pages, then Java certainly provides acceptable performance.
Fact: you can’t even run netbeans 5.0 on 1ghz machine with 256megs of ram.
You can’t run any half-way decent IDE on a computer with 256MB of RAM, and haven’t been able to do so for quite some time. In fact, NetBeans memory usage is quite low.
As for overall memory usage: most of that gets shared across all Java apps these days, and most of it isn’t paged into physical memory, so the actual physical memory usage tends to be fairly low.
Startup times are a problem. They have been addressed, and more work is going in, but there are still some areas that could be fixed. Most apps are up and running in around five seconds though. I imagine Azareus’s problem has more to do with Azareus itself than the JVM.
For scientific computing it is high-performance: scientific computing tends to involve doing the same thing over and over again tens of thousands of times, which is the best-case scenario for a JIT.
While Java still has some way to go on the desktop, it’s certainly not as bad as you make out.
I’m no java expert, but wouldn’t it be nice if people could specify more precisely what they are talking about? The word “java” seams to stand for too many things: the language itself, (an implementation of) the virtual machine or JIT compiler, the bytecodes, various libraries etc etc
SUN is not helping either, with unlogical names (or trademarks) like “java script” or “java desktop”.
I’m aware this is nothing new, but nevertheless its my take on the subject
For me “java” is the entire framework. I count the Language, Compiler and Libraries into it including SWT, AWT and SWING.
Java as only the language would be useless.
Javascript has no space in its name and it isn’t a Sun thing and has no relation to Java except for four letters of the name. Netscape cooked up Javascript and we all wish to hell they’d picked any other name, like Wescript or whatever. What drove me up the wall was when folks generalized this confusion to decide that the J in AJAX stands for Java. But it’s alphabet soup being slopped around, these things happen. Now “Java Desktop”, if it really was first used by Sun, has now bled all over and there are many Java desktop systems and some of them are actually implemented in Java. But it is painful that Sun’s JDS has virtually no Java apps, diluting and confusing the brand. Maybe it will be different some day. IMO we just need for the VM to become as reliable as an operating system as a first step. ( I should qualify that to say “reliable like Solaris or a good Linux distro, not reliable like Windows or the early dot releases of Mac OS X). Tremendous progress has been made in this area of Java VM stability and some process has happened with the system native library code too. But to go with the general assumption of distrust an OS adopts with respect to userspace and map that to the Java app/VM boundary is a tall order and requires a different mindset. The VM’s basic assumption that it’s working with JNI in a cooperative manner has got go go away. Performance would be traded for getting closer to bullet proof robustness. This would be in concert with a basic architectural change to virtualize the VM and give apps the illusion of each having their own logical VM. And the major goal would be to get to the point where one app’s attempt to SIGSEGV itself into oblivion is just a blip to the VM and the rest of the runtimne environment: they scrap the offending app out of the runtime environment, reclaime the resources, and carry on. But this is all blue sky stuff wrt to main stream Java implementations. There’s always hope, though. Its difficult to understand what’s holding back the natural evolution of Java’s implementation to reuse it’s own infrastructure. Sharing the native code coming out of the VM’s compilers is a harder proposition. Some have done this in some cases. But is’a killer to share native code when the compilers are so agile they optimize a bit of code here and a bit there. Transparent sharing of this code between apps is tricky.
But if and when “most is shared” you’ll see some killer changes of perception, as firing off a new, moderate size application might take 50 milliseconds and 10s of kilobytes of memory. This kind of performance and economy has been demonstrated by Sun and IBM. But as with everything there are huge complications. Virtualizing native libraries so there is per-application state is horribly difficult to get right and keep right. But SAP has demonstrated this aspect too.
Maybe all the developments can converge to maka “Java on the desktop” a conmpletely different experience with very lightweight appps.
Or else, maybe Java is being asked to do too much. THe penalty for all these new dimensions of functionality is that they multiply complexity and test cases and certain kinds of detect can defy analysis and understanding. So establishing and maintaining bullet proof stability is very hard. But returning to the model of rock solid stability first, then building on that might allow true resource sharing. And of course theres’s the basic contrast between the above “apps sharing a JVM but each running in a ‘virtual JVM'” scenario from the two legacy cases of separate JVM processes per app or “all in one JVM with classloading hierarchies for the illusion of barries between applications (i.e. like Applets in a web browser).
Time will tell.
Netscape cooked up Javascript and we all wish to hell they’d picked any other name, like Wescript or whatever.
JavaScript had another name, it was called LiveScript when it was invented by Netscape. They renamed it to JavaScript in 1995 after Sun endorsed the language.
Edited 2006-03-10 10:36
“True java has gone forward in the performance area but please never call it “high-performance”.
I don’t care that ackermann was faster than in C. I care for real life applications and requirements and quite frankly the gargantuan RAM requirements by any java app is horrid”
Java IS very high performance if I don’t have to take the time to recompile code for several platforms.
Get over it: RAM is cheap, time is expensive!
Sure, Java isn’t the tool of choice for everything (games, etc.) but it certainly has it’s place on a developer’s workstation.
Fact: you can’t even run netbeans 5.0 on 1ghz machine with 256megs of ram.
Funny, I do just that. Hell I even do it when running my laptop in “Max Battery” mode.
I also can run NetBeans and couple of other Java apps in “Max Battery” mode when CPU frequency scales down from 1.82GHz to ~300MHz (Athlon XP 2500+ Mobile) with 512MB minus 64MB (for GPU). Applications are quite responsive – only startup time increases by few seconds.
Fact: you can’t even run netbeans 5.0 on 1ghz machine with 256megs of ram.
Funny, I’m running it right now, on my P-III 733 with 256 MB of RAM. Perhaps you’re trying to run the IDE and application server? If so, try adding more RAM.
Also, I’m running Windows 2000 Professional. If you’re using Windows XP Pro, try turning off some (or all) of the eye candy.
To free up resources in Windows, stop/disable services such as the Computer Browser and especially the Indexing Service. If you’re not sharing a printer or folder, disable the Server service. You could also consider turning off System Restore.
Fact: you can’t even run netbeans 5.0 on 1ghz machine with 256megs of ram.
Fact: Azareus turns on and off in 15 seconds on a 2Ghz athlon with 512megs of ram.
If youre running a recent release major OS you arent going to do much in 256 MB anyway. NetBeans 5 and Eclipse are both useable for me on a 400 MHz G3, 768 MB, OSX 10.3.9 (though Creator2 is still a dog).
I use a couple of Java productivity apps as well, and aside from a bit longer startup, you’d never know you werent using a native app. Of course Java’s client side was never its greatest aspect.
I’m not surprised by the number of people who dont know what Java is. One of the other posters on this thread (and presumably an above average user) made the mistake of throwing “JavaScript” in with Java. The majority of people have trouble grasping the difference between the WWW and the Internet. Explaining JVM, JIT, etc. is going to be a problem. What they want to know is… “If I double click it, will it do what I want it to.”
Fact: you can’t even run netbeans 5.0 on 1ghz machine with 256megs of ram.
Fact: Azareus turns on and off in 15 seconds on a 2Ghz athlon with 512megs of ram.
Fact: Chuck Norris doesn’t sleep. He waits.
Fact: a system which is self-checking, security conscious from the ground up, memory managed, and stable is not going to be the sexiest in speed or tightest in memory consumption. Get over it.
Fact: Azureus is a proof of concept, not a benchmark.
Fact: Sun’s first priority when developing Java wasn’t creating a gaming platform (a development situation which has typically been forced to optimize code nearly to assembly for performance) or RTOS (where that sort of optimization is the rule rather than the exception).
No matter what Sun says, its VM can’t be consistently across-the-board speed/memory competitive with native code. For that matter, neither can the VM inside Flash, which can barely play back video without straining your resources. Nevertheless there’s a place for both of them, and Java made strides towards supporting platform-agnostic standards when conventional OSes were twiddling their thumbs.
And if you didn’t “snip” my 2 facts out of context you could’ve saved yourself lots of typing as it seems you actualy agree with me on the “high-performance” issue.
Perhaps I didn’t make myself clear.
I don’t consider Java to be “high-performance” because it just isn’t. If you do then ok, but you’re either sunwashed or have a very low definition of “high”.
For me “high” means above average at minimum.
True java has gone forward in the performance…
People now have P4s. I wonder how Java 1.5 would perform on a P1 MMX system compared to Java 1.1
“People now have P4s. I wonder how Java 1.5 would perform on a P1 MMX system compared to Java 1.1”
I have a P1-233 MMX server running Slackware Linux and Sun Java5. Tomcat takes time to start, but works fine.
Java needs tons of RAM, but not that much CPU.
As for why there are people wondering what it is, I think the reason is by and large because there is plenty of information out there on the Internet, but good information is hard to find, as we all know. Even more so, good information on foundations.
All of my favorite technology related web sites do this to some degree: That is, they knowingly or unknowingly make certain assumptions about what level of foundational information and perspective the reader has. And often, those assumptions are that readers know more they do.
It’s nice when a trusted, authoritative source of information helps people start at the beginning, or just fill in some blanks of missing understanding. Much of what I know I learned by reading lots of higher-level stuff, and then over time “filling in the blanks”, or more or less creating the foundational information and understandings in my mind. Eventually I got beyond the need for a 101 introduction on certain topics, but they sure would have expedited the learning process.
Java has always appeared slow to me. It takes a while to start the JIT thingie, and then Java applications always seem to have lag. If I can drag something, it drags slowly. If I type something, the text does not appear right away. This has happened from when I first met Java (on 200mz machines) all the way through to now (using 1.6gz machine). I admire Java, but I dread meeting it most of the time.
The fact remains that Scheme/Lisp is more powerful than Java (you can write an entire object-oriented language using Lisp macros), faster (check the Computer Language shootout), significantly less verbose, and much more straightforward to write if you’re used to thinking functionally. If the most important variable is developer time, why would you ever consider using a language like Java when you have Scheme?
The truth is that the Java popularity explosion is almost entirely the result of business (not technical) decisions. The language is relatively safe and simple and there are a large number of libraries that allow inexperienced programmers to piece together working applications easily. Combine that with the fact that most universities are using Java (and only Java) as their primary teaching language and you have a business friendly language with an extremely large base of cheap labor (college graduates).
From a business perspective, if you want to produce a lot of inexpensive software and be certain that you can hire people to maintain it in the future, then there is really no better choice than Java right now.
From a technical perspective, I honestly can’t think of any domain, project, or application where Java would be the best choice. Sure, you can use Java, but usually, for any domain, there is some other technology that will get it done faster and with better results.
That reminds me of a great article:
http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html
Of course, I’d go a bit further than that, since I think that functional programming could and should be used in practice more than it is. But basically he’s right on target. Here’s one gem:
“The recruiters-who-use-grep, by the way, are ridiculed here, and for good reason. I have never met anyone who can do Scheme, Haskell, and C pointers who can’t pick up Java in two days, and create better Java code than people with five years of experience in Java, but try explaining that to the average HR drone.”
Gee, and I always thought that Java was a religion that Java zealots would use to beat others into subservience as the One True Programming & Development Language.
Why is *BSD not written in Java?
Why is Linux not written in Java?
Why is Office not written in Java?
Why is Windows not written in Java?
Why is Solaris not written in Java?