Running the executable file (.sh) from terminal gives this output
[akash#fedora Downloads]$ ./JDownloader2Setup_unix_nojre.sh
Starting Installer ...
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
at java.desktop/java.awt.Color.<clinit>(Color.java:277)
at com.install4j.runtime.installer.frontend.GUIHelper.<clinit>(GUIHelper.java:46)
at com.install4j.runtime.installer.helper.InstallerUtil.reportException(InstallerUtil.java:1327)
at com.install4j.runtime.installer.Installer.main(Installer.java:48)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:69)
at install4j.Installer378667612.main(Unknown Source)
I don't know if there is any other output I have to send since I am still pretty new to Linux.
If anyone else got same error. Just remove your JRE/JDK and install it again.
Note- It might remove some other apps like libreoffice and stuff, so save files and make backups.
Im using eclipse 2021-3 ( detailed version below), and after updating my form in GUIBuilder I noticed the initGuiBuilderComponents java method in the form class was empty but the .gui file had the components declared.
The stack trace I got after saving the changes in the GUIBuilder is:
enGuiSrc:
[generateGuiSources] Generating GUI sources
[generateGuiSources] timeStr=1.0.0-1621275794779-1621275373210, lastTime=1.0.0-1621275794779-1621275373210
[generateGuiSources] Summary.java unmodified, skipping
[generateGuiSources] timeStr=1.0.0-1622573752664-1622594808739, lastTime=1.0.0-1622573752664-1622594776479
[generateGuiSources] Processing GUI builder file: /Users/jahrvis/eclipse-workspace-mobile/BabyTracker/src/com/jahrvis/mobile/babytracker/forms/CalendarForm.java
[generateGuiSources] Attempting to generate GUI sources for /Users/jahrvis/eclipse-workspace-mobile/BabyTracker/res/guibuilder/com/jahrvis/mobile/babytracker/forms/CalendarForm.gui with System JAXB
[generateGuiSources] Failed to generate Gui Source with System JAXB. Will attempt using bundled JAXB.
BUILD FAILED
/Users/jahrvis/eclipse-workspace-mobile/BabyTracker/build.xml:49: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/model/annotation/AnnotationReader
at com.codename1.build.client.GenerateGuiSources.generateGuiSource(GenerateGuiSources.java:294)
at com.codename1.build.client.GenerateGuiSources.generateGuiSource(GenerateGuiSources.java:246)
at com.codename1.build.client.GenerateGuiSources.execute(GenerateGuiSources.java:216)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:99)
at org.apache.tools.ant.Task.perform(Task.java:350)
at org.apache.tools.ant.Target.execute(Target.java:449)
at org.apache.tools.ant.Target.performTasks(Target.java:470)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1401)
at org.apache.tools.ant.Project.executeTarget(Project.java:1374)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:34)
at org.apache.tools.ant.Project.executeTargets(Project.java:1264)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:712)
at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:532)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:374)
at org.eclipse.ant.core.AntRunner.run(AntRunner.java:476)
at codenameoneplugin.EclipseGUIBuilderConnector$2.run(EclipseGUIBuilderConnector.java:142)
at java.base/java.lang.Thread.run(Thread.java:832)
Caused by: java.lang.NoClassDefFoundError: com/sun/xml/bind/v2/model/annotation/AnnotationReader
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at org.apache.tools.ant.AntClassLoader.defineClassFromData(AntClassLoader.java:1153)
at org.apache.tools.ant.AntClassLoader.getClassFromStream(AntClassLoader.java:1321)
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1373)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1338)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1093)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Class.java:3325)
at java.base/java.lang.Class.getMethodsRecursive(Class.java:3466)
at java.base/java.lang.Class.getMethod0(Class.java:3452)
at java.base/java.lang.Class.getMethod(Class.java:2199)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:258)
at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:250)
at javax.xml.bind.ContextFinder.find(ContextFinder.java:447)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:652)
at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:599)
at com.codename1.build.client.GenerateGuiSources.generateGuiSource_(GenerateGuiSources.java:301)
at com.codename1.build.client.GenerateGuiSources.access$000(GenerateGuiSources.java:32)
at com.codename1.build.client.GenerateGuiSources$1.run(GenerateGuiSources.java:272)
... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.xml.bind.v2.model.annotation.AnnotationReader
at org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1383)
at org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1338)
at org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:1093)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
... 22 more
Total time: 0 seconds
Version: 2021-03 (4.19.0)
Build id: 20210312-0638
Any clue if this is a framework issue with the new eclipse?
This is related to the JDK. Originally the code was written for JDK 8 but jaxb was removed later and for JDK 11 we try to dynamically download it which doesn't always work well.
I think the best workaround would be a migration to Maven which should solve the issue.
Alternatively try to make sure you're running with JDK 8 which should workaround this issue.
So I am trying to use the library called PreferencesFX, which uses FontAwesomeFX which throws the following error.
java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:464)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: java.lang.NullPointerException
at de.jensd.fx.fontawesomefx.commons/de.jensd.fx.glyphs.GlyphsFactory.loadFont(GlyphsFactory.java:64)
at de.jensd.fx.fontawesomefx.commons/de.jensd.fx.glyphs.GlyphsFactory.<init>(GlyphsFactory.java:38)
at de.jensd.fx.fontawesomefx.fontawesome/de.jensd.fx.glyphs.fontawesome.utils.FontAwesomeIconFactory.<init>(FontAwesomeIconFactory.java:28)
at de.jensd.fx.fontawesomefx.fontawesome/de.jensd.fx.glyphs.fontawesome.utils.FontAwesomeIconFactory.get(FontAwesomeIconFactory.java:33)
at com.dlsc.preferencesfx#11.7.0/com.dlsc.preferencesfx.view.UndoRedoBox.<init>(UndoRedoBox.java:17)
at com.dlsc.preferencesfx#11.7.0/com.dlsc.preferencesfx.PreferencesFx.init(PreferencesFx.java:71)
at com.dlsc.preferencesfx#11.7.0/com.dlsc.preferencesfx.PreferencesFx.<init>(PreferencesFx.java:64)
at com.dlsc.preferencesfx#11.7.0/com.dlsc.preferencesfx.PreferencesFx.<init>(PreferencesFx.java:55)
at com.dlsc.preferencesfx#11.7.0/com.dlsc.preferencesfx.PreferencesFx.of(PreferencesFx.java:102)
at my.package.tryThis(Clusters.java:38)
at my.package.Main.main(Main.java:17)
... 11 more
Caused by: java.lang.NullPointerException
at de.jensd.fx.fontawesomefx.commons/de.jensd.fx.glyphs.GlyphsFactory.loadFont(GlyphsFactory.java:62)
... 21 more
Exception running application my.package.Main
I found the cause of the problem to sit at line 62 of the Glyphs Factory class but I have no idea how to fix it.
The method GlyphsFactory.class.getResource(pathToIconFont) returns null, instead of returning the font file. I can see that the method is loading the font file via path /de/jensd/fx/glyphs/fontawesome/fontawesome-webfont.ttf (which seem to be correct). I can see that the font is loaded from package de.jensd.fx.glyphs.fontawesome to package de.jensd.fx.glyphs but both packages are in different jars.
Any ideas why getResource() returns null? I reported it to the developer but it seems the FontAwesomeFX library is abandoned.
I am running this with newest IntelliJ on a Mac OS X Big Sur.
I was successful in patching the library (after reading this) by changing the following line.
Font.loadFont(GlyphsFactory.class.getResource(pathToIconFont).openStream(), 10.0D);
To this.
Font.loadFont(GlyphsFactory.class.getResourceAsStream(pathToIconFont), 10.0D);
I am trying to create a jar file for a Groovy program I have written (BINSIC - an interpreter cum DSL that runs BASIC code: https://github.com/mcmenaminadrian/BINSIC).
I have a fundamental problem in that the code runs fine (if very slowly) on the development machine but fails on deployment (see below) - even on a box where I have installed a full Groovy installation. It looks like I'm failing to import something into the jar which is then called, though I don't know why that would fail when I have a full Groovy install. I have had the same problem with several different versions of Java (also using sdkman) activated.
What do I have to do to get the code to work on deployment? Does anyone know?
Setting groovy 3.0.2 as default.
lorraine#Kobani:~/Downloads$ java -jar binsic.jar test.bas
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.NoClassDefFoundError: Unable to load class org.apache.groovy.jaxb.extensions.JaxbExtensions due to missing dependency javax/xml/bind/JAXBContext
at org.codehaus.groovy.vmplugin.v8.Java8.configureClassNode(Java8.java:458)
at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:274)
at org.codehaus.groovy.ast.ClassNode.getMethods(ClassNode.java:396)
at org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache.scan(AbstractExtensionMethodCache.java:116)
at org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache.getMethods(AbstractExtensionMethodCache.java:97)
at org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache.getMethodsFromClassLoader(AbstractExtensionMethodCache.java:73)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:115)
at org.codehaus.groovy.transform.stc.AbstractExtensionMethodCache.get(AbstractExtensionMethodCache.java:51)
at org.codehaus.groovy.macro.transform.MacroCallTransformingVisitor.findMacroMethods(MacroCallTransformingVisitor.java:119)
at org.codehaus.groovy.macro.transform.MacroCallTransformingVisitor.visitMethodCallExpression(MacroCallTransformingVisitor.java:90)
at org.codehaus.groovy.ast.expr.MethodCallExpression.visit(MethodCallExpression.java:76)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitExpressionStatement(CodeVisitorSupport.java:117)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitExpressionStatement(ClassCodeVisitorSupport.java:200)
at org.codehaus.groovy.ast.stmt.ExpressionStatement.visit(ExpressionStatement.java:40)
at org.codehaus.groovy.ast.CodeVisitorSupport.visitBlockStatement(CodeVisitorSupport.java:86)
at org.codehaus.groovy.ast.ClassCodeVisitorSupport.visitBlockStatement(ClassCodeVisitorSupport.java:164)
at org.codehaus.groovy.ast.stmt.BlockStatement.visit(BlockStatement.java:69)
at org.codehaus.groovy.ast.MethodCallTransformation.visit(MethodCallTransformation.java:42)
at org.codehaus.groovy.transform.ASTTransformationVisitor.lambda$addPhaseOperationsForGlobalTransforms$4(ASTTransformationVisitor.java:336)
at org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:880)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:650)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:627)
at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:389)
at groovy.lang.GroovyClassLoader.lambda$parseClass$3(GroovyClassLoader.java:332)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
at org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:330)
at groovy.lang.GroovyShell.parseClass(GroovyShell.java:530)
at groovy.lang.GroovyShell.parse(GroovyShell.java:542)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:430)
at groovy.lang.GroovyShell.evaluate(GroovyShell.java:474)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:274)
at binsic.BinsicEngine.process(Binsic.groovy:53)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:274)
at binsic.Binsic.run(Binsic.groovy:81)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1262)
at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1029)
at org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:1027)
at org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:1010)
at org.codehaus.groovy.runtime.InvokerHelper.runScript(InvokerHelper.java:442)
at org.codehaus.groovy.vmplugin.v8.IndyInterface.fromCache(IndyInterface.java:274)
at binsic.Binsic.main(Binsic.groovy)
... 5 more
the root error message:
Caused by: java.lang.NoClassDefFoundError:
Unable to load class org.apache.groovy.jaxb.extensions.JaxbExtensions
due to
missing dependency javax/xml/bind/JAXBContext
open site https://search.maven.org/
and search for full class name that s missing with prefix fc:
like this fc:javax.xml.bind.JAXBContext
https://search.maven.org/search?q=fc:javax.xml.bind.JAXBContext
I'm trying to create a JavaFX project in IntelliJ IDEA, but I get errors every time.
After completing tutorial https://openjfx.io/openjfx-docs/#IDE-Intellij, I've got this:
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more
Process finished with exit code 1
After adding -Dprism.verbose=true to VM options in IntelliJ IDEA (so my VM options look like this:
--module-path /myPath/javafx-sdk-11.0.1/lib --add-modules=javafx.controls,javafx.fxml -Dprism.verbose=true
And then I get this output:
Prism pipeline init order: es2 sw
Using Double Precision Marlin Rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2
GraphicsPipeline.createPipeline failed for com.sun.prism.es2.ES2Pipeline
java.lang.UnsatisfiedLinkError: no prism_es2 in java.library.path: [/Users/Lisa/javafx-sdk-11.0.1/lib]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at javafx.graphics/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.es2.ES2Pipeline.<clinit>(ES2Pipeline.java:50)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.sw.SWPipeline
GraphicsPipeline.createPipeline failed for com.sun.prism.sw.SWPipeline
java.lang.UnsatisfiedLinkError: no prism_sw in java.library.path: [/Users/Lisa/javafx-sdk-11.0.1/lib]
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2660)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
at java.base/java.lang.System.loadLibrary(System.java:1867)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:150)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:52)
at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.prism.sw.SWPipeline.<clinit>(SWPipeline.java:41)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:315)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:187)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:91)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Graphics Device initialization failed for : es2, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:280)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:222)
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:260)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:94)
at javafx.graphics/com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:124)
at java.base/java.lang.Thread.run(Thread.java:834)
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: No toolkit found
at javafx.graphics/com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:272)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:267)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:158)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:658)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:409)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:363)
... 5 more
Process finished with exit code 1
What should I do to make my project work?
As mentioned in the documentation of Run HelloWorld using JavaFX 11, the first step to start off with the project is to
Download an appropriate JavaFX runtime for your operating system and
unzip it to a desired location.
Changing my links to an afresh platform specific downloaded SDK's /lib folder solved it for me, while I was previously trying to use the lib folder provided by another user.
Reason: There are dynamic libraries bundled with the SDK in the lib folder that we specify as an argument to the modulepath. These libraries are platform-wise bundled and hence an SDK or lib folder used cross-platform wouldn't be able to provide the dynamic libraries such as those mentioned in the error to load during the application startup.
I had the same problem recently, and after days of trying to figure out what it was, and after some puzzling around, I fixed it!.
It seems all those .dylib files, need permission!
Go to your javafx lib folder, and first be sure you have all the files there. (8 jar, 13 dylib, 1 zip, and 1 properties file). If not, redownload from Gluon's Website.
Now, select all the files and right-click, and select Open With, and choose Terminal. It will ask you if you want to open or cancel... click on open on all the alert windows, when that's done, try to run your project again, and this time it will work!
I wonder, how something like this is necessary, and it isn't anywhere to be found!
I hope all that have this issue, get's it fixed.
I ran into this exact error with an M1 MacBook Pro.
When I originally downloaded the JavaFX SDK (v17.0.1), I chose the aarch64 version for MacOS. After going through all the steps, I was getting this same error.
I resolved it by downloading the x64 version and replacing the old files. You can easily do this by pasting the new zip in the same directory as your "javafx-sdk-xx.x.x" folder, deleting that old folder, and then extracting the new one. It will have the same name and structure as the previous one.
Once the new files are extracted, your application should run as expected.
I had exactly this error when trying to run the build result of jlink. The reason was a typo in the --module-path. A symptom of this is that files like
libprism_common.dylib, libprism_es2.dylib, libprism_sw.dylib,
libjavafx_font.dylib, libjavafx_iio.dylib
(and some more) are missing in the lib/ folder of the build result.
So I recommend to check that the indicated module path actually contains the openjfx modules:
javafx.base.jmod, javafx.controls.jmod, javafx.fxml.jmod,
javafx.graphics.jmod, javafx.media.jmod, javafx.swing.jmod,
javafx.web.jmod
Installing Zulu version of JDK-FX (from https://www.azul.com/downloads/?package=jdk-fx) fixed it for me.