How to run an app headless?

Kevin Rushforth kevin.rushforth at oracle.com
Thu Jun 8 18:54:10 UTC 2023


An easier way would be to use the shims classes, which is what "gradle 
test" uses. Monocle is included with the shims even without needing to 
specify anything. Try something like this:

gradle shims
java @build/testrun.args -Dglass.platform=Monocle 
-Dmonocle.platform=Headless WindowTest.java

-- Kevin


On 6/8/2023 11:06 AM, Thiago Milczarek Sayão wrote:
> Hi,
>
> I'm building javafx with:
> ./gradlew -PincludeMonocle build
>
> And trying to test with:
> java @/home/tsayao/jfx/build/run.args -Dglass.platform=Monocle 
> -Dmonocle.platform=Headless -Dprism.order=sw WindowTest.java
>
> But it seems monocle was not included:
> java.lang.ClassNotFoundException: 
> com.sun.glass.ui.monocle.MonoclePlatformFactory
>
> Any obvious mistake?
>
> -- Thiago



More information about the openjfx-dev mailing list