Building langtools on MacOS fails with reference to Version is ambiguous

Dalibor Topic dalibor.topic at
Mon Dec 13 03:00:49 PST 2010

On 12/13/10 6:22 AM, Reinier Zwitserloot wrote:
> Dalibor,
> could you elaborate on what this patch does?


The error message was:

"reference to Version is ambiguous, both class
> in
> and class
> in match"

In OpenJDK, only one of the types is resolvable by javac during the compilation (i.e. ClassFile.Version),
so using plain 'Version' everywhere in the class is fine. Apparently, there is at least one 
implementation where another class named Version exists in the package (dragged in 
via import*), so one needs to make clear which one is used.

Which changing usage in the class from Version to ClassFile.Version did by touching two lines.

dalibor topic

Oracle <>
Dalibor Topic | Java F/OSS Ambassador
Phone: +494023646738 <tel:+494023646738> | | | Mobile: +491772664192 <tel:+491772664192>
Oracle Java Platform Group

ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg

ORACLE Deutschland B.V. & Co. KG
Hauptverwaltung: Riesstr. 25, D-80992 München
Registergericht: Amtsgericht München, HRA 95603

Komplementärin: ORACLE Deutschland Verwaltung B.V.
Rijnzathe 6, 3454PV De Meern, Niederlande
Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697
Geschäftsführer: Jürgen Kunz, Marcel van de Molen, Alexander van der Ven

Green Oracle <> Oracle is committed to developing practices and products that help protect the environment

More information about the lambda-dev mailing list