But whenever the two worlds converged, the companies brawled. In recent years the battles only intensified as Microsoft gained success with its server software and Sun tried to make inroads on PC desktops, Microsoft's home turf.
Java could undermine Microsoft hegemony on the desktop by making it possible for programmers to develop applications that run on all operating systems, from Windows, Mac OS X and Linux to the less-well known software that powers cell phones and handheld computers.
Microsoft licensed Java but made changes that Sun insisted made it incompatible with the officially sanctioned versions. The companies settled, but Microsoft responded by deciding not to support the software in Windows XP, its latest desktop operating system.
Sun answered in 2002 with the antitrust suit that was settled Friday.
Sun also complained that Microsoft's domination of the desktop gave it a leg up as it tried to cement a similar position with its server software.
In its 1998 complaint to the European Commission, Sun claimed Microsoft was at an unfair advantage because it did not disclose enough information to allow rival software to connect as well as Windows computers in networks running Microsoft's software.
The commission ordered Microsoft to reveal those details, which Sun will now license from Microsoft as part of Friday's settlement.
Microsoft and Sun also clashed, though indirectly, in both companies' efforts to create a standard for single-logon identification. With such technology, Web surfers would be able to use just one user name and password to log into multiple sites and make purchases over the Internet.
Microsoft wanted to use its Passport technology. Sun led the efforts of a group called the Liberty Alliance to create a competing standard.
In Friday's agreements, the companies said they would cooperate in developing software to manage "identities, authentication, and authorization." The Liberty Alliance was not mentioned, though previously neither side ruled out Microsoft's participation in the group.
Sun also is competing with Microsoft in office productivity software, including word processing and spreadsheets. Its StarOffice package offers nearly the same suite of applications as Microsoft's dominant Office.
Sun and other productivity-software vendors have complained that Microsoft has not been willing to share details so that customers can take documents created with Office and open and save them in other programs.
There was no mention of that kind of software, however, in Friday's agreement.
Open Government: A San Francisco Treat
San Francisco took Obama's pledge of open and transparent government seriously, and launched datasf.org -- its attempt to give the city's data back to its citizens. Developers and users have embraced it, and the city's mayor is already looking ahead....

NOTE: Offer valid for U.S., U.S. possessions, & Canada only.