knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

JavaFX?

Tue Nov 25, 2014 1:27 am

Anybody got JavaFX running on their Pi? I've got 1.8.0_u6 installed and I can compile the program but I can't even get a simple HelloWorld app to run. It just hangs. A little help?

Thanks,

User avatar
Gavinmc42
Posts: 4508
Joined: Wed Aug 28, 2013 3:31 am

Re: JavaFX?

Tue Nov 25, 2014 3:15 am

Try increasing GPU memory to 256.
JavaFX needs lots

I use Netbeans on a PC and network into the RPi.
Don't try putting Netbeans on the Pi, just too slow.
Run it on PC, Linux or Windows via network.
JavaFX takes over the screen so SSH makes it easier to debug etc.

I started with the Stopwatch example, cool 3D shadows on second hand.
BlueJay IDE looks good for on RPi Java developement but have not tested it for FX.

Look around for the JavaFX 8 book and others.
http://it-ebooks.info/book/3646/
I'm dancing on Rainbows.
Raspberries are not Apples or Oranges

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: JavaFX?

Wed Nov 26, 2014 12:11 am

I'll try increasing the memory and report back.

Thanks for the book recommendation, I ordered it.

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: JavaFX?

Wed Nov 26, 2014 12:42 am

256MB memory didn't help, it still hangs with no errors or output of any kind.

I must have something not configured correctly. I've got another Pi, I'll try that one and see if it is any different.

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: JavaFX?

Wed Nov 26, 2014 1:16 am

Both Pis have same problem, just hang. I've tried setting 256MB video memory, I've tried three different SD cards but all with Raspbian and two versions of Java, 1.8.0 and 1.8.0_6. Swing programs run great but FX programs just hang.

I'd love some ideas?

Thanks,

knute
Posts: 550
Joined: Thu Oct 23, 2014 12:14 am
Location: Texas
Contact: Website

Re: JavaFX? - Solved more or less

Wed Nov 26, 2014 2:47 am

So I solved most of my problem, and that is because I was using VNC to look at my Pi desktop not looking at it directly. Apparently JavaFX apps don't run in the same way as Swing apps. They use some sort of full screen/framebuffer mode? Any way my app runs but without the normal windowing features. I did try an app that uses some FadeTransitions with full screen sized images and it ran smooth as glass.

When the program exits however, the screen is all black and I have to drag the mouse from one corner to the other to clear it up.

Is this what everybody else sees when they run JavaFX apps on the Pi?

Thanks,

Return to “Java”