Updated from 12:11 p.m. EST Investors finally got a glimpse Friday of a rising Sun ( SUNW). The struggling server giant enjoyed a big stock jump after stunning Wall Street with a double-barreled news barrage. First, the company delivered details of its latest setback, a steep second-quarter earnings shortfall that will accompany another round of layoffs. But then CEO Scott McNealy saved the day by claiming a victory, and a much-needed $2 billion payday, in Sun's nasty legal spat with Microsoft ( MSFT). Sun shares, which have fallen sharply in the last month and largely have failed to take part in the tech stock rally of the last year, were recently up 72 cents, or 17.2%, to $4.92 after trading as high as $5.05 intraday in Nasdaq-leading volume of more than 165 million shares. For its part, Microsoft added 66 cents, or 2.6%, to $25.73. As troubling as the latest operational shortfall is -- Sun expects to post a loss twice as big as Wall Street expected, on a 7% revenue shortfall -- investors clearly chose to focus on the legal deal, which settles antitrust and patent claims against the Redmond, Wash., software titan. "This agreement launches a new relationship between Sun and Microsoft -- a significant step forward that allows for cooperation while preserving customer choice," Sun CEO Scott McNealy said. At a quickly called press conference in San Francisco, McNealy and Microsoft CEO Steve Ballmer marked the new chapter in their companies' tumultuous relationship by exchanging red jerseys from their hometown hockey team, the Detroit Red Wings. "Friendship and partnership starts on the ice," Ballmer quipped. Sitting side by side in director's chairs, the pair recounted how McNealy initiated the settlement efforts by inviting Ballmer to a game of golf almost a year ago. The two companies were close to reaching an agreement in December, but then Microsoft got preoccupied with the European Union antitrust case. In sharp contrast to past badmouthing of Microsoft, McNealy noted that he and Ballmer are good friends who went to Harvard and then Stanford business school together. Striking a collegial tone, both executives repeatedly touted the interoperability between their two platforms that will result from a 10-year technical collaboration agreement -- interoperability that they claim customers have been demanding and consequently led to the settlement. "Maybe we've grown up; maybe they've grown up," McNealy said in response to a question about whether Microsoft's behavior has changed. Or maybe the customer has become more in charge, McNealy added. Relationships are surely nice, but Wall Street seemed equally pleased with the cash that Sun stands to take in. Microsoft, which is also in the process of being ordered by European regulators to publish the source code for its server products, will pay Sun $700 million to resolve antitrust issues and an added $900 million to resolve patent suits. Microsoft will make an additional $350 million upfront payment under a new royalty agreement, with Sun pledging payments when certain technology is incorporated into its server products.