UPDATE 1-Oracle wins U.S. approval to buy Sun Microsystems

* U.S. government approves Oracle’s purchase of Sun

* U.S. government does not impose restrictions

* Deal subject to European Commission approval

NEW YORK, Aug 20 (Reuters) - Software giant Oracle Corp ORCL.O has won U.S. antitrust approval to buy computer maker Sun Microsystems, clearing a key hurdle in the companies' plan to close the $7.4 billion deal before the end of this month.

Oracle said on Thursday that the deal cleared the U.S. Justice Department with no restrictions. The takeover also requires approval by the European Commission.

U.S. officials in June said they wanted to scrutinize the deal over questions about Oracle’s plans for licensing Sun’s Java software, one of the world’s most widely used computer languages. Since then, investors have been waiting to see how long that might delay the deal.

Analysts have said that the delay has worked to the advantage of Sun's two chief rivals in the server market, IBM IBM.N and Hewlett Packard Co HPQ.N.

They have been courting Sun’s customers during the past few months, trying to persuade them to change suppliers amid uncertainty about Oracle’s plans for running the server business. Until Oracle closes the acquisition, it cannot say much about its strategy for Sun’s hardware division.

Oracle has said it expects to close the deal by Aug. 31.

Sun’s shareholders have approved the deal.

Oracle agreed to buy Sun in April after the collapse of weeks of talks between the struggling hardware and software maker and IBM.

The deal gives Oracle’s outspoken billionaire CEO, Larry Ellison, control of Sun’s Java software and the Solaris operating system for Unix servers.

Ellison has said he wants to build and sell Sun computers preloaded with Oracle software and also tweak Java software so that it is easier to use on smartphones and netbook computers.

Shares of Oracle closed up 16 cents at $21.94 prior to the approval.

Reporting by Paul Thomasch and Jim Finkle. Editing by Robert MacMillan