poorly written c programs still run better than anything written in java...at least everything that has been publicly available to see in the past 25 years.
I suspect that neither of us has tried every program publicly available in the last 25 years.
Also, Java apps weren't around much prior to about 2000, and the first JDK wasn't even available until 1996.
I have used vastly more apps written in C than in Java (probably 100's of times more) and hence have seen many more horrible ones in C than in Java. Most of my experience with Java apps are IDE's written in Java (which were excellent) and bioinformatics tools written in Java (which were excellent).
Again, whether or not an application is horrible depends foremost on the person's programming, not the language. Granted, some languages are less prone to programmer error than others. For example, writing in assembly is more prone to programmer error than C, and C is actually more prone to programmer errors than Java (as Java is more strongly typed, isn't based as much on raw manipulation of pointers, etc.).
Pointers in C historically were a source of a lot of inadvertent programming errors. Back in the days of DOS, this was a huge pain in the neck, since DOS did not have protected memory. So, you could have an errant pointer stomp all over the place -- you might stomp on the code for the printf statement, for example, and not know it until your program crashed on a printf statement, which is nowhere close to where the bug in your code is. That very event back in the early or mid 90's (writing neural network code for financial analysis) was what caused me to make a holy vow never to write another DOS program again and made me switch to OS/2. Windows 95 and Windows NT weren't out yet, and my choice was realistically DOS, OS/2, or Unix, which at the time was very expensive and hugely cumbersome on the PC. I guess one option was the Mac (which I programmed in during grad school), but it was not very friendly to scientific programming in those days for various reasons (although I picked Macs for our office staff, on which we played Marathon after hours -- man, that was fun).
Every language has a set of things it is good at and some things its not good at, too. C has the widest set of uses. Java is great at some things, too.