Gradle build, one step forward, two backward :)

Richard Bair richard.bair at
Mon Jul 8 09:09:43 PDT 2013

> Caused by: java.lang.NullPointerException
> 	at
> com.sun.javafx.font.PrismFontLoader.loadFont(
> 	at javafx.scene.text.Font.<init>(
> 	at javafx.scene.text.Font.getDefault(
> 	at javafx.scene.CssStyleHelper.<clinit>(
> :(
> Was't the font code open sourced?

You are on Linux I'm guessing (educated guess). The open source linux implementation was I believe just barely pushed. Which repo are you building from (master or graphics)?

> 2. ***  OpenJDK with closed jfxrt.jar ***
> The OpenJDK build fails before getting anywhere, which is very
> surprising to me:
> JAVA_HOME=/open/jdk-8/
> BINARY_STUB=/closed/jdk-8-ea-96/jre/lib/ext/jfxrt.jar
> [org.gradle.cache.internal.DefaultFileLockManager] Releasing lock on
> artifact cache (/home/neugens/.gradle/caches/artifacts-23).
> [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter]
> Finished executing task ':graphics:compileJava'
> [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with
> an exception.
> * What went wrong:
> Could not resolve all dependencies for configuration
> ':graphics:compile'.
>> Could not find :plugin:.
> Required by: rt:graphics:unspecified
> * Exception is:
> org.gradle.api.artifacts.ResolveException: Could not resolve all
> dependencies for configuration ':graphics:compile'.
> at
> org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfiguration.rethrowFailure(
> at
> org.gradle.api.internal.artifacts.ivyservice.DefaultResolvedConfiguration.rethrowFailure(
> Any help here would be great... I don't see why OpenJDK is not able to
> build OpenJFX, even having the closed jar in the path.

Ah. OK. The problem here is that a couple of the modules require the plugin.jar because of Possibly if we move the file from web module to base (or graphics module) then we wouldn't need this dependency. If you edit build.gradle and comment out the plugin dependency and do a build, you should see where the build failures occur.

I did a search and see in two places, web and graphics modules. Yikes.

> 3. *** Closed JDK with openjfxrt.jar ***
> This fails. I expected this, but the build goes very far it seems:
> public final class AudioClipBuilder implements
> javafx.util.Builder<>
> [...]
> symbol:   class WebEvent
> location: class WebEngineBuilder
> error: cannot find symbol
> […]

I guess this is looking for media files. When they are open sourced hopefully this will work.

> 4. ***  OpenJDK with just created open jfxrt.jar ***
> Well, you guessed this fails too... I wonder how the iOS people got
> their code working at all... Is there any secret repository you guys are
> using?

Probably the same issue as #3? The iOS folks are skipping media & web I believe.

> 5. *** Running OpenJDK with closed jfxrt.jar ***
> This is even nicer:
> Graphics Device initialization failed for :  es2, sw
> Error initializing QuantumRenderer: no suitable pipeline found
> java.lang.RuntimeException: java.lang.RuntimeException: Error
> initializing QuantumRenderer: no suitable pipeline found
> [...]
> Caused by: java.lang.RuntimeException: No toolkit found
> 	at
> 	at
> com.sun.javafx.application.PlatformImpl.startup(
> 	at
> com.sun.javafx.application.LauncherImpl.startToolkit(
> 	at
> com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(
> 	at
> com.sun.javafx.application.LauncherImpl.launchApplication(

This happens if the native libraries cannot be found. They need to be located relative to the jfxrt.jar that you are using. How are you running this application?

> I think the OpenJDK build (2.) and running closed jfrt.jar + OpenJDK
> (5.) are the most serious issues at the moment.
> I remember that running closed jfx with OpenJDK used to work, but maybe
> I'm wrong.
> Any plans to address that, or hints where I can start looking to help
> out?

Actually I think we should start here with just a fully open build. Anything using media will fail at runtime, but we should still be able to compile and I think the native font stuff for linux is out there, along with build changes by Peter to support fully open builds of web view. I'm going to fire up a new VM with a completely clean Ubuntu system and try building with OpenJDK so I can follow along.


More information about the openjfx-dev mailing list