In some other forums, I have seen too many C/C++ advocates come on, say how they hate Java, how slow it is, etc. Drives me nuts.
You pick the right tool for the job. Java fits most jobs nicely.
As an example, I don't believe, even with JDK 1.4 and hardware accelleration, I would write a game in Java. I definitely wouldn't write real-time specific apps, like music applications (midi, audio mixing, etc) in Java if I planned on having a lot of capabilities (like unlimited audio FX, unlimited audio channels, etc). Device drivers are another thing that really have to be written at the native level and Java wouldn't be good for.
On the other hand, look at the war with MS .NET VS
J2EE. There was an issue on this not too long ago on Java Developer Journal. The "demise" of Sun may very well be happening, but will Java be affected? Will .NET take over and the 3 million + Java developers have to switch? Not at all. Java is WAY too strong in the market with a much larger population of developers writing Java code than .NET. Sure some will convert, most of the time because their company decides for them and they have no choice. Sometimes because the truth is, most Java dev tools don't match up to .NET tools in areas like RAD development. BUT, look at all the "players" in J2EE. BEA, Oracle, IBM, HP, Allaire, Borland, Symantec, Rational
Rose, and MANY more are all tightly nitted to Java/J2EE. Some of them also do .NET, like Borland.
Despite a recent crap performance
test that MS paid for and hosted, most apps are far cheaper to deploy with Java IF you choose a reasonable server to do so. If you run out and pick up iPlanet from Sun at $25K per CPU, then yes, J2EE may be more expensive to deploy. But in terms of scalability, I believe J2EE has .NET beat hands down.
Ok, that was a little off topic. The point is, as the other poster said, there isn't any need to compare for speed. If you need ultimate speed for games and stuff, you use C, make a cross-platform game engine and go from there. It isn't "terribly" hard to do this, if managed correctl. If you want more manageable code which usually results in faster time to market, or faster updates and fixes, you go with Java. Well, even that may not be correct to say because skilled C/C++ developers know their code, so they can manage it fairly well. I still lay odds that reading and deciphering Java code is much easier than C/C++ code, maybe even .NET C# code.