JAVAFX and Raspberry PI B
Francisco Javier Godino
jgodino at yahoo.com
Sun Sep 14 16:07:31 UTC 2014
Hi David:
I followed this instructions:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/RaspberryPiFX/raspberryfx.html#overview
The jdk recommended is as follows:
"Oracle Java SE 8 JDK for Linux ARMV6/7"
I don't remember how, I get the same java that you mention in "https://wiki.openjdk.java.net/display/OpenJFX/OpenJFX+on+the+Raspberry+Pi"
jdk-8u6-linux-arm-vfp-hflt.gz
I installed following the instrunctions in the section: "Installing the Raspberry Pi JDK 8"
inside the page:
http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/RaspberryPiFX/raspberryfx.html#section3
If I run "java -version", I see this:
java version "1.8.0_06"
Java(TM) SE Runtime Environment (build 1.8.0_06-b23)
Java HotSpot(TM) Client VM (build 25.6-b23, mixed mode)
I suppose that I installed the correct one, isn't it?
Thanks
Javier
On Friday, September 12, 2014 12:07 PM, Jerome Cambon <jerome.cambon at oracle.com> wrote:
FXMLLoader should be part of jfxrt-controls.jar (in jre/lib/ext directory)
Jerome
On 9/12/14, 4:36 PM, Francisco Javier Godino wrote:
> Hello:
>
> I installed Oracle Java SE 8 JDK for Linux ARMV6/7 on Raspberry PI using Oracle indications.
>
> http://www.oracle.com/webfolder/technetwork/tutorials/obe/java/RaspberryPiFX/raspberryfx.html#overview
>
>
> I created an application to run on it and I have an issue loading FXML.
>
> The code is:
>
> private Initializable replaceSceneContent(String fxml) throws Exception {
>
> Locale locale = new Locale("es", "ES");
> ResourceBundle rb = ResourceBundle.getBundle("internacionalizacion.lang",locale) ;
>
> FXMLLoader loader = new FXMLLoader();
> InputStream in = Main.class.getResourceAsStream(fxml);
> loader.setBuilderFactory(new JavaFXBuilderFactory());
> loader.setLocation(Main.class.getResource(fxml));
> loader.setResources(rb);
>
> AnchorPane page;
> try {
> page = (AnchorPane) loader.load(in);
> } finally {
> in.close();
> }
> Scene scene = new Scene(page, stage.getWidth(),stage.getHeight()-50);
> stage.setScene(scene);
> return (Initializable) loader.getController();
> }
>
> java.lang.reflect.InvocationTargetException
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:367)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:300)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:483)
> at sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:767)
> Caused by: java.lang.RuntimeException: Exception in Application start method
> at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:894)
> at com.sun.javafx.application.LauncherImpl.access$000(LauncherImpl.java:56)
> at com.sun.javafx.application.LauncherImpl$1.run(LauncherImpl.java:158)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.NoClassDefFoundError: javafx/fxml/FXMLLoader
> at startup.Main.replaceSceneContent(Main.java:273)
> at startup.Main.gotoPantallaPrincipal(Main.java:209)
> at startup.Main.start(Main.java:180)
> at com.sun.javafx.application.LauncherImpl$8.run(LauncherImpl.java:837)
> at com.sun.javafx.application.PlatformImpl$7.run(PlatformImpl.java:335)
> at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:301)
> at com.sun.javafx.application.PlatformImpl$6$1.run(PlatformImpl.java:298)
> at java.security.AccessController.doPrivileged(Native Method)
> at com.sun.javafx.application.PlatformImpl$6.run(PlatformImpl.java:298)
> at com.sun.glass.ui.lens.LensApplication$RunnableEvent.dispatch(LensApplication.java:182)
> at com.sun.glass.ui.lens.LensApplication._runLoop(LensApplication.java:860)
> at com.sun.glass.ui.lens.LensApplication.access$1800(LensApplication.java:58)
> at com.sun.glass.ui.lens.LensApplication$4.run(LensApplication.java:917)
> ... 1 more
>
>
> Do I need install anything else?
>
> Thanks
>
> Francisco
More information about the openjfx-dev
mailing list