I have been doing Java programming for about the last 5 years. Before that I was doing C++. I work with both these days.
When talking about Java, the best thing to do is separate Java, the programming language from Java, the platform.
Java, the programming language is a robust, object-oriented language that is based on C++ but with many of the "gotchas" of C++ removed. Using and object-oriented programming practices, developers should have no trouble developing almost any type of application. Granted, at the moment Java is best suited for server-side tasks.
Java, the platform is where all the criticism comes from. The platform is where Write Once Run Anywhere (WORA), applets, JVM, JITs, and the rest of the stuff that gives Java a bad name comes from. The platform, for the most part is/was part of Sun's idea to create an alternative to Windows. The original intent of WORA was to sucker everyone into coding Java applications that ran slow on the JVM then coming out with Java hardware saying ?Hey look, Java runs really quick on Sun hardware!?. It was a dumb idea and it has not taken off, or ever will. Applets are almost completely useless because of the browser wars and Microsoft's interference.
Java does not attempt to take the place of C++. C++ needs to be around for platform specific stuff. The Java problem domain and the C++ problem domain are for the most part different. When it comes to speed differences between Java and C++, the gap is narrowing. JDK 1.3 executes server-side apps about as fast as C++ under Windows and Linux, based on my personal experience.
Java for executing database calls is excellent. Depending on the driver. Most databases come with "native drivers" that will allow database transactions in par with any native app.
Java keeps getting better and better. Microsoft is scared of Java. They announced their "Java killer" last week, called C# (C-sharp). In my opinion it offers little over Java, even less so because it is tied to Windows. However, I am sure it will be an enormous success with the Windows camp because it allows people who do not want to deal with C++ to write Windows application using the new COM libraries that will ship with Visual Studio 7.0.