On Windows/Linux platform,I as a common computer user,could not nearly find any software written in Java.
- The two operating system(Windows and
Linux) are written with C. - The two web browsers(IE and firefox) are
written with C++. - The two web server(IIS and Apache) are written with C++.
- Most database management system are written with C/C++.
And I could not find software that was written with Java on desktop application area.It seems that programmers would prefer to use cross-platform Widgets(Qt,wxWidgets etc) rather than Java.
My question are:
- Why Java is not suitable to do
kernel application?If the reason is
its slowness,how many times is it
slower than C/C++? - Why programmers prefer C/C++ to do desktop application despite Java provides a consistent and excellent API library.I think it should requires less code using Java instead of C/C++ to develop most desktop application(e.g. card games) and the developed application could be easily deployed to other platform.
- Are there any famous applications done with Java from user aspect(means we use it every day)?
thanks.
1.
Java is not good for kernel development. The main reason is control. It’s not just about speed (although that is a part of it). Java doesn’t give programmers the same amount of control over memory, over exactly how their code is executed. In C/C++, you can usually guess exactly which assembly code will be created, based on your code. Not so in Java.
Note: This is true of C, and also of parts of C++: If you’re using a lot of higher-level functionality in C++, you obviously have the same loss of control. But C++ gives the option of going either way.
2.
C/C++ is more used than Java for desktop for many reasons. Probably some of them are historical (they have been used for much longer), probably some of it is the problem of “Look and feel”, which basically means that Java programs tend to look like Java programs, and not like most programs on the user’s machine (there are solutions, but this used to be true of almost all Java programs, which made programmers stay away).
But the most important thing to understand, I think, is that C and C++ are also much less used for GUI nowadays. Obviously they’re still used, but a lot of programmers are moving on to other languages, like C# and others.
3.
If you’re talking about famous desktop applications, I think the most famous (certainly for programmers) is Eclipse. It’s also a really great application, and certainly looks great, which just goes to show you that Java can be used for good natural-looking desktop apps.
I’m not really aware of any others.