代码示例
public class Main extends Application {
public static void main(String[] args) {
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception {
// 打开一个网页
HostServices host = getHostServices();
host.showDocument("http://www.baidu.com");
}
}