OpenJFX on iOS using RoboVM

Tom Schindl tom.schindl at bestsolution.at
Wed May 22 04:49:21 PDT 2013


Hi,

I also tried do something like this. I was able to work around the NPE 
by adding a dummy com.sun.javafx.text.PrismTextLayout to the project.

I also tried to run the vanishing circles demo but that one fails with 
an effect problem.

Tom

On 22.05.13 13:15, Tobias Bley wrote:
> Unfortunately because of the missing PrismFontLoader and the empty DummyFontLoader actually you can't use JFX controls like Label or Button because of an NullPointerException.
>
> Exception in thread "Thread-5" java.lang.RuntimeException: Exception in Application start method
> 	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java)
> 	at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java)
> 	at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java)
> 	at java.lang.Thread.run(Thread.java)
> Caused by: java.lang.NullPointerException
> 	at com.sun.javafx.text.PrismTextLayout.setContent(PrismTextLayout.java)
> 	at javafx.scene.text.Text.getTextLayout(Text.java)
> 	at javafx.scene.text.Text.needsFullTextLayout(Text.java)
> 	at javafx.scene.text.Text.access$400(Text.java)
> 	at javafx.scene.text.Text$7.invalidated(Text.java)
> 	at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java)
> 	at javafx.beans.property.ObjectPropertyBase.bind(ObjectPropertyBase.java)
> 	at javafx.css.StyleableObjectProperty.bind(StyleableObjectProperty.java)
> 	at com.sun.javafx.scene.control.skin.LabeledText.<init>(LabeledText.java)
> 	at com.sun.javafx.scene.control.skin.LabeledSkinBase.<init>(LabeledSkinBase.java)
> 	at com.sun.javafx.scene.control.skin.LabelSkin.<init>(LabelSkin.java)
> 	at javafx.scene.control.Label.createDefaultSkin(Label.java)
> 	at javafx.scene.control.Control.impl_processCSS(Control.java)
> 	at javafx.scene.Parent.impl_processCSS(Parent.java)
> 	at javafx.scene.Node.processCSS(Node.java)
> 	at javafx.scene.Scene.doCSSPass(Scene.java)
> 	at javafx.scene.Scene.preferredSize(Scene.java)
> 	at javafx.scene.Scene.impl_preferredSize(Scene.java)
>
>
>
> Am 20.05.2013 um 19:04 schrieb Niklas Therning <niklas at therning.org>:
>
>> Source code and build instructions for the BrickBreaker JavaFX sample on
>> iOS/RoboVM is now available online [1]. The static libs included in that
>> download have been compiled from my fork [2] of Danno Ferrin's JDK7
>> backport of openjfx [3]. For build instructions please see [4].
>>
>> [1]
>> http://blog.robovm.org/2013/05/brickbreaker-javafx-sample-on-ios-robovm-source-code-released.html
>> [2] https://bitbucket.org/ntherning/jfx78
>> [3] https://bitbucket.org/narya/jfx78
>> [4] https://gist.github.com/ntherning/5613607
>>
>> /Niklas
>>
>>
>> On Tue, May 14, 2013 at 9:30 AM, Niklas Therning <niklas at therning.org>wrote:
>>
>>> Hi,
>>>
>>> I'll clean up the code and post it somewhere later this week. We're not
>>> using OpenJDK's class libraries. It's Android's.
>>>
>>>
>>> On Mon, May 13, 2013 at 6:38 PM, <steve.x.northover at oracle.com> wrote:
>>>
>>>> Niklas!!!
>>>>
>>>> This is very cool.  Please make your work available as soon as possible
>>>> so others can try it out.  I have played a bit with RoboVM and looked into
>>>> what would be required to port JavaFX to it but did not get the time to do
>>>> a deep dive.  Are you using the OpenJDK for the class libraries?
>>>>
>>>> Steve
>>>>
>>>>
>>>> On 13/05/2013 5:32 AM, Niklas Therning wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've managed to get OpenJFX running on iOS using RoboVM. Please see the
>>>>> RoboVM blog [1] for a quick video of it.
>>>>>
>>>>> I'd like to say thank you for writing such great code! BrickBreaker
>>>>> almost
>>>>> worked out of the box! I had to remove/stub out font related stuff of
>>>>> course and PlatformLogger had to be copied from OpenJDK. Also had to fix
>>>>> a
>>>>> tiny bug in the native glass code [2] and an NPE in
>>>>> PlatformUtil.getRTDir()
>>>>> when PlatformUtil.class isn't available in any jar file [3].
>>>>>
>>>>> Do you have an ETA on the open-sourcing of the font related code? It
>>>>> would
>>>>> be a fun challenge to get most of the controls or even the Ensemble
>>>>> sample
>>>>> to work but fonts are essential of course.
>>>>>
>>>>> [1] http://blog.robovm.org/2013/**05/javafx-openjfx-on-ios-**
>>>>> using-robovm.html<http://blog.robovm.org/2013/05/javafx-openjfx-on-ios-using-robovm.html>
>>>>> [2] https://javafx-jira.kenai.com/**browse/RT-30327<https://javafx-jira.kenai.com/browse/RT-30327>
>>>>> [3] https://javafx-jira.kenai.com/**browse/RT-30329<https://javafx-jira.kenai.com/browse/RT-30329>
>>>>>
>>>>> Regards,
>>>>> Niklas Therning
>>>>>
>>>>
>>>>
>>>
>



More information about the openjfx-dev mailing list