Totally agree on Flash, and I'm pretty sure that the lack of support on mobile platforms will eventually kill it for good. Adobe doesn't even want to keep it around at this point. For Java, there are two distinctly different things happening there:
Java applets - this is what needs to go away, and is the source of all of the annoying security vulnerabilities and resulting updates. This, specifically, is a set of browser plug-ins that allow Java "applets" served in web pages to run in the Java Runtime Environment. No half-sane web developer uses Java applets in any new projects, so these will eventually go away on their own. Some notable hold-outs are still using these applets, so Oracle has to continue supporting the problematic browser plug-ins.
Software that runs on the JRE (Java Runtime Environment) - this is the vast, VAST majority of all Java software. It's a decent platform, and used in a staggering number of commercial and open-source software projects. If Java went away, at least half of all of the internet services we use daily (along with a lot of useful software) would go with it. We don't want that to happen, and don't worry, it won't. A large cross-section of IT software developers still love Java...it's not going anywhere.