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

Mac: javafxpackager fails to find jfxrt.jar

XMLWordPrintable

      Reported in the Oracle forum:
      ======================

      I've just installed 7u6 b17 on OS X

      I had an existing NB JavaFX application project that was already built. I decided to use it to test running javafxpackager manually. From my projects folder I ran this:
      $ /Library/Java/JavaVirtualMachines/jdk1.7.0_06.jdk/Contents/Home/bin/javafxpackager -createjar -appclass mypackage.MyClass.class -srcdir build/classes/ -outfile MyApp.jar -v
      Exception in thread "main" com.sun.javafx.tools.packager.PackagerException: Error: jfxrt.jar needs to be on classpath for -createbss and for -createJar without -nocss2bin
      at com.sun.javafx.tools.packager.PackagerLib.loadClassFromRuntime(PackagerLib.java:1408)
      at com.sun.javafx.tools.packager.PackagerLib.createBinaryCss(PackagerLib.java:1433)
      at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1340)
      at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1319)
      at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1319)
      at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1319)
      at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1319)
      at com.sun.javafx.tools.packager.PackagerLib.jar(PackagerLib.java:1287)
      at com.sun.javafx.tools.packager.PackagerLib.packageAsJar(PackagerLib.java:235)
      at com.sun.javafx.tools.packager.Main.main(Main.java:410)
      Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.parser.Css2Bin
      at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
      at java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
      at com.sun.javafx.tools.packager.PackagerLib.loadClassFromRuntime(PackagerLib.java:1406)
      ... 9 more

      Huh? javafxpackager doesn't know how to find jfxrt.jar either?

            janvalenta Jan Valenta (Inactive)
            igor Igor Nekrestyanov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: