From where I stand, either IBM or Oracle were good matches.
Regarding Microsoft - as far as I know, the majority of Oracle's database revenue is coming in on Solaris/sparc and Linux/x86 platforms. Oracle was already squarely in the Java / Linux camp before the acquisition - their applications and middleware stacks are almost entirely Java (or moving there), and they have their own Linux distribution.
The Java acquisition is an imporant defensive move - there are too many free languages and tools out there to make a significant revenue directly from selling languages. With Oracle and IBM both distributing JVMs, Java has a high probability of holding on to its vibrant developer community. I suspect Oracle had concerns about relying on IBM (a very direct competitor) for Java (a foundation technology for Oracle products). The cost of running Java is nothing compared to the costs Oracle would experience if Java either faltered or was tilted against them. Oracle actually built their own JVM for use within the database years ago, though it's essentially dormant now.
The same likely goes for Sun's commercial middleware offerings - Oracle is likely interested in incorporating the best pieces of these into their own stack (see BEA, PeopleSoft, JD Edwards, etc.).
MySQL may be different story - Oracle doesn't seem to have any strategic need for it and they already sell / give away smaller editions of the Oracle DB. I'm personally expecting Oracle's MySQL distribution to wither on the vine but some of the open source forks have a good shot at thriving.
Sparc is likely to continue dying off slowly, whether in Oracle's hands or as a spun off property. There are still plenty of companies happy to upgrade legacy boxes at this point and there's non-trivial revenue that can be derived from them, but the high end systems market will likely consolidate into Power and Itanium, as well as being absorbed into x86. Sparc doesn't have a champion any more and the larger price / architectural trends don't look good for it.
Solaris is an interesting piece of technology and it's less clear what's likely to happen to it. Oracle may see strategic benefits to distributing it themselves as a favored , or they may take some of the technologies (ZFS, scheduler, etc.) and port them to Linux.
OpenOffice and NetBeans are also less clear. There doesn't seem to be significant revenue or strategic potential for either unless Oracle wants to go up against MS Office. Oracle already has JDeveloper in the IDE space and it seems more likely they'd build on Eclipse if there's interest in a new platform.