For reference, here is a minimal implementation using Java 8 :
@Override
public void start(Stage mainStage) throws Exception {
Scene scene = new Scene(new Region());
mainStage.setWidth(640);
mainStage.setHeight(480);
mainStage.setScene(scene);
//this makes all stages close and the app exit when the main stage is closed
mainStage.setOnCloseRequest(e -> Platform.exit());
//add real stuff to the scene...
//open secondary stages... etc...
}