... Given that many Java programs work very crappy ...
Which is equally true for all languages, of course. Maybe the key factor isn't the language
No. Sometimes the problem is in the framework. Lot's of errors I've seen in Java programs originate from parallel threading errors.
I appreciate English (probably) isn't your first language. In the context of programming, the word "framework" has so many different definitions,
In programming context a framework is a set of libraries that complete a language or offer a programming environment. See: http://en.wikipedia.org/wiki/Software_framework
OK. So then the validity or otherwise of your argument depends on
which libraries you mean.
If you mean the standard Java runtime libraries that that are part of the JDK/J2SE, then you will have to work very hard and be very specific in order to justify your assertion. Why? Because there are many high-reliability high-availability soft real-time applications that would be visible and
very expensive if they failed. I know. I've seen them and built some myself.
If, on the other hand, you mean some other library that uses the standard Java runtime libraries, then you will also have to be specific, but it will be less difficult to justify your assertion. Why? Because anybody can "write a Java framework", publish it and then try to debug it when someone complains - and many have with predictably ghastly results.
If, on the third hand, the frameworks you are referring to involve communicating with other computers across the internet, then you may well be right, because far too programmers don't understand the fundamental limitations of distributed systems. Far too few have even heard of L Peter Deutsch's "eight fallacies of distributed computing", let alone realised how thry must shape frameworks and applications. Far to many presume that the network and all the other computers (that they don't even know exist) will always function conrrectly.
Hells teeth, I've even come across people that think it is possible to have reliable distributed transactions. (Hint: it isn't, unless you've made fundamental breakthroughs in solving the Byzantine General's problem, and the "split brain" problems arising from network partitioning). Such people are very likely to create a subtly faulty mess even on a single computer, in any language.
But neither the "other hand" nor the "third hand" issues are related to Java: they are common to all languages and environments.
Blaming Java almost always the equivalent of saying that, say, Analog Devices integrated circuits are faulty because a Chinese (or other) backstreet shop read an application note, copied a circuit in it without understanding, turned it into a bad PCB, and sold it.