1

                                                                    EXHIBIT 23.1

               CONSENT OF ERNST & YOUNG LLP, INDEPENDENT AUDITORS

     We consent to the incorporation by reference in this Annual Report (Form
10-K) of Sun Microsystems, Inc. of our report dated July 21, 1999, included in
the 1999 Annual Report to Stockholders of Sun Microsystems, Inc.

     Our audits also included the financial statement schedule of Sun
Microsystems, Inc. listed in Item 14(a). This schedule is the responsibility of
the Company's management. Our responsibility is to express an opinion based on
our audits. In our opinion, the financial statement schedule referred to above,
when considered in relation to the basic financial statements taken as a whole,
presents fairly in all material respects the information set forth therein.

     We also consent to the incorporation by reference in the Registration
Statements (Form S-8 Nos. 33-9293, 33-11154, 33-15271, 33-18602, 33-25860,
33-28505, 33-33344, 33-38220, 33-51129, 33-56577, 333-01459, 333-09867,
333-15179, 333-34543, 333-34651, 333-38163, 333-40677, 33-40675, 333-59503, 333-
62987, 333-65531, 333-67183, 333-72413, and 333-86267) pertaining to the 1982
Incentive Stock Option Plan, the Restricted Stock Plan, the 1984 Employee Stock
Purchase Plan, the 1987 Stock Option Plan, the 1988 Director's Stock Option
Plan, the 1989 French Stock Option Plan, the 1990 Employee Stock Purchase Plan,
the 1990 Long-Term Equity Incentive Plan, the Equity Compensation Acquisition
Plan, the U.S. Non-Qualified Deferred Compensation Plan, the Integrity Arts,
Inc. 1996 Stock Option Plan, the 1997 French Stock Option Plan, the Red Cape
Software, Inc. 1996 Stock Option Plan, the NetDynamics, Inc. 1995 Stock Option
Plan, the i-Planet, Inc. 1996 Stock Option/Stock Issuance Plan, the Maxstrat
Corporation 1994 Stock Option Plan, and the Star Division Corporation 1998 Stock
Plan and we also consent to the incorporation by reference in Amendment No. 1 to
the Registration Statement (Form S-3 No. 333-81101) and related Prospectus of
our report dated July 21, 1999, with respect to the consolidated financial
statements incorporated herein by reference and our report included in the
preceding paragraph with respect to the financial statement schedule included in
this Annual Report (Form 10-K) of Sun Microsystems, Inc. for the year ended June
30, 1999.

                                          ERNST & YOUNG LLP

Palo Alto, California
September 23, 1999