Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8160464

Application.getHostServices throws ClassNotFoundException

    Details

      Description

      To reproduce, run the following test program in jigsaw mode:

      import javafx.application.Application;
      import javafx.application.HostServices;
      import javafx.application.Platform;
      import javafx.stage.Stage;

      public class HostServicesTest extends Application {

          @Override public void start(Stage stage) {
              HostServices hs = getHostServices();
              Platform.exit();
          }
      }


      $ java HostServicesTest
      java.lang.ClassNotFoundException: com.sun.deploy.uitoolkit.impl.fx.HostServicesFactory
      at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base@9-internal/BuiltinClassLoader.java:366)
      at java.lang.ClassLoader.loadClass(java.base@9-internal/ClassLoader.java:419)
      at java.lang.Class.forName0(java.base@9-internal/Native Method)
      at java.lang.Class.forName(java.base@9-internal/Class.java:378)
      at com.sun.javafx.application.HostServicesDelegate.lambda$getInstance$0(javafx.graphics@9-internal/HostServicesDelegate.java:52)
      at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method)
      at com.sun.javafx.application.HostServicesDelegate.getInstance(javafx.graphics@9-internal/HostServicesDelegate.java:45)
      at javafx.application.HostServices.<init>(javafx.graphics@9-internal/HostServices.java:52)
      at javafx.application.Application.getHostServices(javafx.graphics@9-internal/Application.java:334)
      at HostServicesTest.start(HostServicesTest.java:9)
      at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(javafx.graphics@9-internal/LauncherImpl.java:843)
      at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(javafx.graphics@9-internal/PlatformImpl.java:452)
      at com.sun.javafx.application.PlatformImpl.lambda$runLater$10(javafx.graphics@9-internal/PlatformImpl.java:421)
      at java.security.AccessController.doPrivileged(java.base@9-internal/Native Method)
      at com.sun.javafx.application.PlatformImpl.lambda$runLater$11(javafx.graphics@9-internal/PlatformImpl.java:420)
      at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(javafx.graphics@9-internal/InvokeLaterDispatcher.java:96)
      at com.sun.glass.ui.gtk.GtkApplication._runLoop(javafx.graphics@9-internal/Native Method)
      at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$8(javafx.graphics@9-internal/GtkApplication.java:195)
      at java.lang.Thread.run(java.base@9-internal/Thread.java:843)

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ckyang Chien Yang (Inactive)
                Reporter:
                kcr Kevin Rushforth
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Due:
                  Created:
                  Updated:
                  Resolved: