Oracle Corp. has agreed to buy Sun Microsystems, swooping in after Sun’s talks with IBM fell apart. Oracle will pay $7.4 billion, or $9.50 a share for Sun, the Wall Street Journal reports, a 42% premium on Friday’s close. Though Sun has been losing money, Oracle expects the deal to tack $1.5 billion onto its profits in the first year, and called Sun’s Java platform “the most important software” it’s ever acquired. (More Sun Microsystems stories.)