List of usage examples for javafx.application HostServices getCodeBase
public final String getCodeBase()
From source file:Main.java
@Override public void start(Stage stage) { Button openURLButton = new Button("Go!"); openURLButton.setOnAction(e -> {/*from w w w.j a v a2s . com*/ HostServices host = this.getHostServices(); System.out.println("CodeBase:" + host.getCodeBase()); System.out.println("DocumentBase:" + host.getDocumentBase()); System.out.println("Environment:" + host.getWebContext()); System.out.println("Splash Image URI" + host.resolveURI(host.getDocumentBase(), "splash.jpg")); }); Scene scene = new Scene(openURLButton); stage.setScene(scene); stage.setTitle("Knowing the Host"); stage.show(); }