C is more portable than java.
java 1.6, 1.7, 1.x
very incompatible in key ways.
my last company did server code in java. it sucked. we had to have watchdog processes to keep the java daemons alive. and even the watchdog needed a watchdog (I kid you not). color me unimpressed.
on android, java is known to be dog slow and you need to use native api's to get any decent speed from the thing. our android app was first in java and had to be redone in C for that very reason.
java is also too much of a moving target. it changes too much over time. C has settled down and has been essentially unchanged for a long time, now. compilers are mature, run time libs are mature, debuggers are mature.
there was (maybe still is) a company who did java 'pauseless garbage collection' at the hardware level. kind of funny that you have to do this kind of schtick just to make java run fast and reliably. when I asked my friend at that company what the big draw with java is, his reply was that, at least in business coding, java requires much less skill level and for business apps, they insist on the most unskilled labor (ie, cheapest) they can find. to allow unskilled programmers to write code, they need 'help' from the language.
just not impressed with java. sorry if that offends anyone.
So what if all those things are written in C? Analogy: You better go learn Latin before you talk to a doctor because medical terms are taken from Latin.
You know less about Java than you think you do. That's ok, though, as most people know less about Java than they think they do. You're in good company with those Java misconceptions. Doesn't make you correct, though. For example, Java is faster at memory access than C. Java does one large malloc() for every hundred a C program might do, (depends on the program, of course) and each malloc() has overhead... I encourage you to benchmark it if you do not believe me. Too many people are bound by the misconception that Java performance has not improved in the 18 years it's been around. The runtime optimizer and garbage collection system, among many others, have both gotten EXTREMELY good in terms of performance. Yes, startup is slower, but most Java apps that I'm familiar with startup maybe once a week at most. A two-second penalty in startup for using Java is not a concern.
Anyone (almost) can write a Java app that is architecturally unsound, performs poorly, and requires constant supervision. It's more difficult to find someone that knows what they're doing, primarily because object orientation is very difficult to teach to someone that is used to procedural programming, and it is often even more difficult to get those folks to learn to use objects effectively. This is true with anything that has even a modicum of complexity, as all software development does. C# takes it all further than Java.
I'm guessing you're a Linux advocate with that username, and these attitudes you are expressing, which seem to come down to "Not C? Worthless," and may or may not include "Not Linux? Worthless." These things are simply not that simple. Virtually nothing is cut and dried like that, and I do hope you gain the ability and the willingness to see positions that are not your own as potentially valid and worthy of investigation sometime soon. Maybe you already do, I don't know, but you're not acting like it.
using comment chars to 'comment out' a block of code is really wrong and such a newbie thing to do
If I met you and you told me you used #ifdef's to comment code, I'd punch you in the head
The overuse of pre-processor directives in code should merit the death penalty
Thank you.