RFR [9] Modular Source Code

Erik Joelsson erik.joelsson at oracle.com
Wed Aug 20 08:37:09 UTC 2014


Hello,

The basic rule for the new source layout is that for each library, there 
is a directory where all sources for that library go. This was hard to 
apply to libawt and friends since as you say, some files go in libawt on 
windows and libawt_xawt on linux and solaris. For now, I put those in 
common for lack of a better place.

/Erik


On 2014-08-20 01:09, Phil Race wrote:
> On a related note I am scratching my head about why some files
> destined to be compiled into libawt or libawt_xawt go into a directory
> called 'common'.
> Eg OpenGL sources are in common but aren't common to all libs
> or even to all awt libs, since they would go into libawt on windows
> and libawt_xawt on unix and not at all into libawt_headless.
>
> 'common 'might (guessing here)  have started out as place to put 
> interface
> header files shared between libs but maybe got adopted for other uses ?
>
> -phil.
>
>
>
> On 08/18/2014 07:15 AM, Anthony Petrov wrote:
>> On 8/18/2014 5:47 PM, Magnus Ihse Bursie wrote:
>>> libawt et al:
>>>    The relation between libawt, libawt_headless, libjawt, libawt_xawt
>>> and libawt_lwawt are hairy enough to make my brain curl up. I believe
>>> there are simplifications to be made but I gave up trying to figure 
>>> them
>>> out.
>>
>> libawt contains code that is shared between all AWT lib 
>> implementations. Depending on what mode/toolkit is requested, it 
>> loads a specific variant of the awt native library, such as:
>>
>>  - libawt_headless - headless AWT implementation.
>>  - libawt_xawt - XToolkit implementation (uses X11 for GUI)
>>  - libawt_lwawt - CToolkit implementation (uses Cocoa for GUI)
>>
>> Historically, we were able to choose between lwawt and xawt on Mac in 
>> the past, but we no longer support or even build xawt on Mac. Also, 
>> in the past there was MToolkit (which used Motif for GUI). Again, we 
>> no longer support this toolkit. So, currently we always use xawt on 
>> Linux/Solaris and lwawt on Mac. But since we still need to choose 
>> between a real toolkit and a headless toolkit, we need the common 
>> libawt library.
>>
>> libjawt is a helper library that implements JAWT API and is loaded by 
>> applications that use the JAWT interface which allows them to get 
>> direct access to the native AWT drawing surface and use native APIs 
>> (e.g. OpenGL) to draw on the surface. This library isn't needed for 
>> regular AWT/Swing applications.
>>
>> So I'm not sure if the current set of AWT libraries could be 
>> simplified any further.
>>
>> Hope this helps.
>>
>> -- 
>> best regards,
>> Anthony
>



More information about the jdk9-dev mailing list