NEW YORK (MarketWatch) -- Oracle Corp. ORCL, +0.60% stepped in to buy Sun Microsystems Inc. java for $9.50 a share in a deal valued at $7.4 billion, just weeks after a reported deal by IBM IBM, +1.57% to buy the maker of Java software fell apart. Oracle will pay a premium of $2.81 a share, or 42%, over Sun Micro's closing price of $6.69 a share on Friday. Oracle said the deal is valued at $5.6 billion net of Sun's cash and debt. Oracle, which has bought a series of software firms including PeopleSoft, said the deal will add to earnings in the first full year after closing.