Question about BUILD_HEADLESS and HEADLESS

Artem Ananiev artem.ananiev at oracle.com
Fri Feb 17 01:56:30 PST 2012


On 2/15/2012 1:42 PM, Michael McMahon wrote:
> The stub library is headless/libmawt.so*. Right? It's being built on Mac
> OS as well, but currently being
> put in a different location to the normal one. It also seems like it is
> not being used
> because if you rename or delete it, there isn't any change in behavior,
> which sounds like a bug.

headless/libmawt.so is not used when running in headless mode with 
CToolkit. Have you tried forcing XToolkit? That is

AWT_TOOLKIT=XToolkit java -Djava.awt.headless=true AppName

?

> So, what exactly is the function of the stub library? Is it to allow
> some functions of awt to work that don't require a real display?

headless/libmawt.so contains all the native code that is expected to 
work in headless mode, e.g. printing or image manipulation.

> In any case, I don't see why Mac should be different from Solaris or
> Linux in this respect.

Thanks,

Artem

> - Michael.
>
> * In 8 it has a different name, but it'll be built on Mac as well in 8.
>
> On 14/02/12 17:27, Phil Race wrote:
>> On windows headless is simply a state.
>> But Solaris/Linux have "true" headless builds where there are headless
>> (stub) versions of UI libraries.
>> And I think that headless is a valid JCK mode .. you can pass JCK in
>> headless
>> on platforms that don't support UI. But I'd check the JCK guys on that
>> one,
>> don't take my word for it.
>>
>> -phk.
>>
>> On 2/14/2012 6:49 AM, Michael McMahon wrote:
>>> On 14/02/12 13:47, Fredrik Öhrström wrote:
>>>> Is the use of HEADLESS in gcc.make (linux and bsd) an archaeological
>>>> remnant and should be removed? (No source in the hotspot repo looks a
>>>> the HEADLESS define.)
>>>>
>>>> Is there any reason to not build a headless version of awt? (ie modify
>>>> BUILD_HEADLESS to not be defined.)
>>>> It seeems like headless is not currently built on bsd/macosx/windows,
>>>> but it is built on solaris and linux?
>>>>
>>>> //Fredrik
>>> Fredrik,
>>>
>>> It's being built on macosx as well.
>>>
>>> - Michael.
>>
>


More information about the macosx-port-dev mailing list