oracleSun Microsystems just announced that its shareholders have approved its landmark sale to Oracle for $7.4 billion at a rate of $9.50 a share. But the software titans aren’t done yet — the deal still has to survive antitrust inspection by the U.S. Department of Justice.

While the DOJ is very close to green-lighting the merger, there’s one last sticking point concerning licensing of Java. Regardless, Oracle says these loose ends should tie themselves up by the end of the summer.

The acquisition couldn’t come at a better time for Sun, which has taken a beating since the economic downturn last fall. The company went into today’s vote with expectations that sales will continue to fall more than $1 billion through the fourth quarter, and that its share price will drop anywhere from 6 to 16 cents a share.

Oracle has been working out the terms of the deal with Sun since the end of April — it was one of several potential buyers, including IBM. In fact, deciding which one to go with had been somewhat of a scramble, with several unnamed competitors making it to various points in the deal-making process before being turned away.

Despite Sun’s financial troubles, its Java software package made it attractive acquisition bait for Oracle. In fact, in an announcement in April, the company called it “the most important software Oracle has every acquired.” Those who have been watching the deal suggest that the company will integrate Sun’s software and hardware assets with its Exadata database machine — one of Oracle’s most popular offerings.

While the finished agreement may be good news for Sun as a company, it has many of its employees concerned that they’ll be out of a job. Whether or not that happens may depend on the company’s earnings announcement, coming no later than Aug. 31. While neither Oracle nor Sun have said anything about layoffs yet, the former just said it will cut 1,000 jobs from its European staff. And in April, analysts forecasted that Oracle would need to cut 10,000 to 15,000 jobs from Sun’s workforce in order to turn it around. On top of that, it might spin off some of Sun’s hardware and software operations into their own companies.