exactly, but "java is slow" meme, just won't die...
That's because there are certain ways in which Java *is* slow:
* AWT is a heap of shit, very badly designed, and takes a positive age to initialize. Swing is no better, because Swing is built as a layer on top of AWT.
* Java's performance for floating point leaves a lot to be desired because Java's specification of some mathematical operation means that processor-specific instructions cannot be used, e.g., to calculate the result of Math.exp() on x86 processors, so it must be done in software. This bug: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7174532 suggests they may have recently found a solution, but I don't think this is in any released version of Java yet.
* Garbage collection is much slower than hand-optimized memory allocation, and heap allocation is much slower than stack allocation, so a well written C++ application can always outperform Java on memory handling.
This doesn't mean that Java isn't perfectly suitable for the vast majority of tasks, particularly those that are I/O bound like a typical server application, but there are things that it really isn't good enough for.
(Signed, somebody who once attempted to write a high-performance neural network simulator in a language that can't do exp() at a reasonable speed.)