Monocle in 8u25

Benjamin Gudehus hastebrot at gmail.com
Wed Nov 5 15:57:39 UTC 2014


Hi Sean,

I've put the Monocle sources directly in my code directories for
testing purposes. Putting it into a separate Jar is possible and I
thought that pre-compiled jars could be provided via Maven.

I didn't do a complete OpenJFX build, because I was only interested in
the Headless component of Monocle, i.e. I didn't needed the
platform-dependent dynamic libraries.

Rough instructions were given in a previous mail. There were some
request to provide the pre-compoile jars so I will additionally set up
a public repository with detailed instructions when I'm back home.

--Benjamin

On 11/5/14, Sean True <sean.true at gmail.com> wrote:
> Did you build the glass/ui/monocle sources into a separate jar, or did you
> do a complete OpenJFX build?
>
> If you did a separate build, a recipe would be extremely helpful.
>
> -- Sean
>
> On Tue, Nov 4, 2014 at 6:17 PM, Benjamin Gudehus <hastebrot at gmail.com>
> wrote:
>
>> I managed to run Monocle/Headless on Windows with 8u25. This will allow
>> users to run headless tests.
>>
>> All what is needed is to copy all files from "com/sun/glass/ui/monocle"
>> of
>> "javafx-src.zip" and add the
>> cursor resource files from
>> "modules/graphics/src/main/resources/com/sun/glass/ui/monocle" of the
>> related hg tag in the OpenJFX repository [1].
>>
>> Before Application#launch() is called we need to manually set the Glass
>> and
>> Monocle platforms:
>>
>> accessStaticField(com.sun.glass.ui.PlatformFactory.class, "instance",
>>     new com.sun.glass.ui.monocle.MonoclePlatformFactory());
>> accessStaticField(com.sun.glass.ui.monocle.NativePlatformFactory.class,
>> "platform",
>>     new com.sun.glass.ui.monocle.headless.HeadlessPlatform());
>>
>> The directory structure in 8u40 is a bit different, but there could be
>> added version checks. Checking
>> for the JVM vars "glass.platform" and "monocle.platform" might be also
>> added to this code.
>>
>> [1] http://hg.openjdk.java.net/openjfx/8u-dev/rt/tags
>>
>>
>> On Tue, Nov 4, 2014 at 8:42 PM, Benjamin Gudehus <hastebrot at gmail.com>
>> wrote:
>>
>> > Hmm. Seems that Class.forName() in com.sun.glass.ui.PlatformFactory
>> > won't
>> > retrieve externally defined PlatformFactorys. So I will try to set the
>> > PlatformFactory.instance field manually, before the
>> > Application/Tookit/FX-Thread is launched.
>> >
>> > On Tue, Nov 4, 2014 at 7:36 PM, Benjamin Gudehus <hastebrot at gmail.com>
>> > wrote:
>> >
>> >> Thank you. That makes it clearer. :)
>> >>
>> >> Is it possible to supply the headless part of Monocle in an external
>> >> Jar
>> >> for desktop platforms?
>> >>
>> >> As far as I know the only possibility to run TestFX tests with
>> >> Hudson/Jenkins is in headless mode.
>> >> TestFX's tests itself can only run with the X virtual framebuffer on
>> >> Linux test clients for the Travis CI so far.
>> >>
>> >> So far the only advice I could give TestFX users who like to run
>> headless
>> >> tests is to use 1.8.0_20-ea-b05.
>> >>
>> >
>>
>


More information about the openjfx-dev mailing list