iktuz
Posts: 2
Joined: Sun Sep 21, 2014 2:52 pm

JavaFx8 application get stucked loading jar files

Sun Sep 21, 2014 3:02 pm

Hi All,

I am facing a weird situation. When I try to run a very simple 'hello world' JavaFX 8 application, nothing seems to happen. First I just run the 'java HelloWorld' command, for the code:

Code: Select all

import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
 
public class HW extends Application {
    public static void main(String[] args) {
        launch(args);
    }
    
    @Override
    public void start(Stage primaryStage) {
        primaryStage.setTitle("Hello World!");
        Button btn = new Button();
        btn.setText("Say 'Hello World'");
        btn.setOnAction(new EventHandler<ActionEvent>() {
 
            @Override
            public void handle(ActionEvent event) {
                System.out.println("Hello World!");
            }
        });
        
        StackPane root = new StackPane();
        root.getChildren().add(btn);
        primaryStage.setScene(new Scene(root, 300, 250));
        primaryStage.show();
    }
}
As you can see, very simple and small code. So I decided to run with the -verbose option. At some point, the classes stop to be loaded and the memory usage drops to ground, as you can see here http://postimg.org/image/dauwj1yvb/.

Can someone point me some direction? What I am missing here?

Best Regards Fellows!

iktuz
Posts: 2
Joined: Sun Sep 21, 2014 2:52 pm

Re: JavaFx8 application get stucked loading jar files

Sun Sep 21, 2014 10:01 pm

Here is the answer https://community.oracle.com/thread/2475515?tstart=0

Quoting:
Don, the error you are seeing is not fatal and JavaFX should be continuing to run. If you are not seeing anything, I wonder if maybe you are using a remote X connection or VNC. JavaFX writes directly to the display framebuffer, so unless you have a screen connected directly to the Pi you won't see anything. Could this be the problem?
Actually I am using VNC as well. When connecting my Raspberry Pi on my TV, the application shows up despite of the fact that the window has no frame and the mouse is trapped inside the application panel space. Another issue to pursuit...

Best Regards.

Return to “Java”