A federal appeals court judge on Thursday expressed serious doubts about a lower-court order requiring Microsoft to incorporate Sun Microsystems' Java programming language in the Windows operating system.

Judge Paul Niemeyer, one of the three judges hearing Microsoft's appeal, sharply questioned whether the must-carry preliminary injunction was needed to prevent imminent harm to Sun and the Java program while a trial was conducted.

Niemeyer, who dominated questioning during an hour of presentations from both sides, also criticised the legal basis of the injunction issued late last year by US District Judge J. Frederick Motz in Baltimore.

The injunction, put on hold by the appeals court, was based on findings that Microsoft was illegally maintaining a monopoly via the Windows operating system for personal computers. But Niemeyer said Java was "middleware" rather than an operating system and that the injunction should have rested on a monopoly extension claim.

Sun attorney Rusty Day tried to argue the distinction was not consequential under antitrust law, and in any case, Sun sold server software that directly competed with Windows. "If that's your theory... it seems to me the District Court missed it all," Niemeyer said.

Sun charges that Microsoft has tried to sabotage Java, which can run on a variety of operating systems, because it threatens the dominance of the Windows OS.

Sun, which is seeking $1bn, or about £630m, in damages, charges Microsoft's acts against Java include distributing its own polluted version of the software and dropping Sun's version from Windows XP.

There was no indication when the appeals court might rule.

Despite Niemeyer's scepticism, Judge Roger Gregory on the panel connected monopoly maintenance tactics by Microsoft and actions against Java, saying the protection of Windows was a motivating factor. "That's where your aim was when you fragmented their product," Gregory told Microsoft lawyer David Tulchin.

Judge H. Emory Widener asked no questions at the hearing.

Motz, assigned cases arising from the landmark government antitrust suit against Microsoft filed in 1998, concluded in his 23 December ruling that Sun had a good chance of winning its case against Microsoft.

Without the injunction, Motz said, the contest between Java and Microsoft's .Net Web services software could "tip" in favor of .Net because of Microsoft's past antitrust law violations.

"What does tipping mean? I've looked it up and read what the economist said and it doesn't make much sense," Niemeyer said on Thursday.

Tulchin argued for Microsoft that the appeals court should strike down the must-carry order because there was no evidence that Sun faced any imminent harm from past deeds by Microsoft.

If anything, Motz's order would tip the market toward Sun, argued Tulchin. "Then Sun is obtaining an advantage in the marketplace that can never be replaced," he said.

George Mason University law professor Ernest Gellhorn cautioned against reading too much into the judges' questions. "Questions by the court of appeals don't necessarily predict the outcome," Gellhorn said.

A settlement of the government antitrust suit against Microsoft was endorsed by US District Judge Colleen Kollar-Kotelly in November, although Massachusetts and West Virginia are appealing.

In the government case, an appeals court in June of 2001 upheld trial court findings that Microsoft had illegally maintained its Windows operating system monopoly, but rejected breaking the company in two as a remedy.