Java Platform, Standard Edition Deployment Guide
Contents    Previous    Next

18 Coding Tips

This topic provides programming tips for development and deployment of Java and JavaFX applications that work in all execution environments.

This topic includes the following sections:

18.3 Using JavaFX Host Services

For JavaFX applications, the Application.getHostServices() method provides access to execution-mode-specific services, including:

  • Access to information about the code base and the document base.

    For example, for embedded applications this is the URL of the application and URL of the host web page, respectively.

  • Access to the host web page using the JavaScript engine, only available to embedded applications.

  • Ability to open a web page in the browser.

Example 18-3 shows a few things you can do with getHostServices().

Contents    Previous    Next

Copyright © 1993, 2017, Oracle and/or its affiliates. All rights reserved.