openjfx / samples Goto Github PK
View Code? Open in Web Editor NEWJavaFX samples to run with different options and build tools
License: BSD 3-Clause "New" or "Revised" License
JavaFX samples to run with different options and build tools
License: BSD 3-Clause "New" or "Revised" License
Its very disheartening when you download the hellofx example app, extract it into a project directory, and load all the external jars as module path include in the IDE in an user library then Eclipse compiles and removes all the errors etc, but run button does not work.
Error: Could not find or load main class MyClass
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
edit: eclipse has a runtime setting of which modules on the module list to load, and its by default nothing, needs to be changed manually to MODULE-PATH.
edit: next error is hellofx.fxml loading error even if it has correct path.
edit: solution: fx:controller= variable needs correct class name.
why Java application requires fxml to run?
making a runnable jar from eclipse with including library jars in package is not working also when running with oracle java-21 jvm in java-17 compatibility mode.
additionally the instructions for modular eclipse ide getting hellofx running or app image do not work, both not finding either hellofx module or the jmod required files.
error when running with java -jar myapplication.jar from command line on windows 11 (same code works from eclipse run button):
Feb 17, 2024 1:32:25 AM com.sun.javafx.application.PlatformImpl startup
WARNING: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @971b07'
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
java.lang.RuntimeException: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer.getInstance(QuantumRenderer.java:283)
at com.sun.javafx.tk.quantum.QuantumToolkit.init(QuantumToolkit.java:253)
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:263)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:290)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:162)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:651)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:671)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: Error initializing QuantumRenderer: no suitable pipeline found
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.init(QuantumRenderer.java:95)
at com.sun.javafx.tk.quantum.QuantumRenderer$PipelineRunnable.run(QuantumRenderer.java:125)
... 1 more
Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:118)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:62)
Caused by: java.lang.RuntimeException: No toolkit found
at com.sun.javafx.tk.Toolkit.getToolkit(Toolkit.java:275)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:290)
at com.sun.javafx.application.PlatformImpl.startup(PlatformImpl.java:162)
at com.sun.javafx.application.LauncherImpl.startToolkit(LauncherImpl.java:651)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:671)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Thread.java:1583)
openjfx dont work generate executable .jar...
When i use maven and i do "mvn clean install" i can't run the jar file with "java -jar .jar"
openjdk version "12.0.2" 2019-07-16 OpenJDK Runtime Environment (build 12.0.2+10) OpenJDK 64-Bit Server VM (build 12.0.2+10, mixed mode, sharing)
command: "java -jar .jar"
error: "no main manifest attribute, in .jar"
when doing that using this plugin in maven
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> <version>3.1.2</version> <configuration> <archive> <manifest> <mainClass>nl.joshaprior.App</mainClass> </manifest> </archive> </configuration> </plugin>
it gives me this error "Error: Could not find or load main class nl.joshaprior.App
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application"
when i google that issue and follow all the things i still get the same error
and when using a Start class that calls App.launch() (because i red somewhere that its because of that extends) it gives me this error
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:802)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:700)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:623)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at nl.joshaprior.Start.main(Start.java:7)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 10 more```
I downloaded the most recent openjfx files and tried to use this example and I get an error about not finding the jmods for javafx. The recent sdk does not include any jmod files and I need to include --module-path $FX_SDK:$FX_JMODS to build/run the program.
How to solve this problem
jdk 12
javafx D:\javafx-sdk-11.0.2\lib
vmoptions Already set
I'm really tired of reporting this error all the time
就是 intej 新建的javafx 例子
This is the new JavaFX example created by intej
China's technology website CSDN, no one answered, had to turn to foreign technology gurus
Exception in Application start method
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: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:835)
Caused by: java.lang.IllegalAccessError: class com.sun.javafx.fxml.FXMLLoaderHelper (in unnamed module @0xa51a44a) cannot access class com.sun.javafx.util.Utils (in module javafx.graphics) because module javafx.graphics does not export com.sun.javafx.util to unnamed module @0xa51a44a
at com.sun.javafx.fxml.FXMLLoaderHelper.(FXMLLoaderHelper.java:38)
at javafx.fxml.FXMLLoader.(FXMLLoader.java:2056)
at sample.Main.start(Main.java:13)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:389)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
... 1 more
Exception running application sample.Main
Hello,
I was reviewing this sample for a JavaFX 11 project I'm working on.
Can the fat jar process be used with with other dependency library jar files?
Thanks
Missing license either in github project nor in sourcefiles.
openjfx/samples
.I see the openjfx/javafx-gradle-plugin
is licensed under BSD 3-Clause License
.
If the license is known, I'm glad to help to refactore all sample files.
The OpenJFX Docs link to this sample project to configure maven to build a fat jar. Uncommenting the graphics dependencies will definitely create a multi-platform jar in the package
phase, but the same pom cannot be used to do a mvn javafx:run
, because then it fails with:
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
This can be easily circumvented by including the dependencies only when wanting to build the fat jar.
I'll provide a PR with improvements.
Also it would be nice to fix https://openjfx.io/openjfx-docs/ >> Runtime Images >> Non Modular project/application >> Cross-platform jar.
The NetBeans Modular Maven sample project fails to run and prints the exception shown below:
$ mvn clean javafx:jlink
...
[INFO] BUILD SUCCESS
...
$ target/hellofx/bin/launcher
Exception in Application start method
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: Exception in Application start method
at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:900)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:195)
at java.base/java.lang.Thread.run(Thread.java:830)
Caused by: java.lang.IllegalStateException: Location is not set.
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459)
at javafx.fxml/javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435)
at [email protected]/org.openjfx.hellofx.App.loadFXML(App.java:32)
at [email protected]/org.openjfx.hellofx.App.start(App.java:20)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:846)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:455)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:391)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
... 1 more
Exception running application org.openjfx.hellofx.App
The same error occurs when the application is launched from the IDE or with the command mvn clean javafx:run
. I'm running under the following environment:
#!/bin/bash
# Sets up the environment for building JavaFX applications
syspath=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# JavaFX Linux SDK and JMODs
export JAVAFX_SDK=$HOME/lib/javafx-sdk-13/lib
export JAVAFX_JMODS=$HOME/lib/javafx-jmods-13
export JAVA_HOME=$HOME/opt/jdk-13.0.1
export ANT_HOME=$HOME/opt/apache-ant-1.10.7
export GRADLE_HOME=$HOME/opt/gradle-6.0-rc-1
export PATH=$GRADLE_HOME/bin:$ANT_HOME/bin:$JAVA_HOME/bin:$syspath
I will follow up shortly with a pull request that fixes the problem.
Hi,
I am a beginner at JavaFX. I want to display a stage but, although I follow the instructed steps to get the exact path (except for storing it in a C: folder which I can't to do since I have Mac), I cannot display it as it shows me: Error occurred during initialization of boot layer java.lang.module.FindException: Module javafx.controls not found
. I saw a previous issue on the same error on NetBeans which said that I have to add the FX library in Modulepath under Run (Properties -> Libraries -> Run -> Modulepath) and, from what I understood delete the part of the path which says: --module-path
, I still have no success in displaying the stage. When I follow the latter suggestion I get this error: `Error: Could not find or load main class Documents\FX17\lib'
I also made sure that I unchecked the "compile on save" option. I would highly appreciate other suggestions or corrections to my comprehension of the topic.
I'll move a project from SWT to JavaFX and start exploring JavaFX and OpenJDK version 12.
I end up with the Getting started with JavaFX and IntelliJ and the Modular with Maven section. I downloaded the project from here and followed the instructions.
On mac I have to modify line 42 (IDE/IntelliJ/Modular/Maven/hellofx/pom.xml)
from
<mainClass>hellofx/org.openjfx.App</mainClass>
to
<mainClass>org.openjfx.App</mainClass>
and everything works fine.
Facilitated care of links (pictures) in readme for the future.
Based on the experience of my own GitHub projects, I believe that it is easier to update "links" and "images" into "ReadMe"s (written in markdown) when they are bundled at the end of the document.
Error: Could not find or load main class HelloFX
Caused by: java.lang.NoClassDefFoundError: javafx/application/Application
Apparently the openjfx 11.0.2 sdk doesn't include the Application
class.
These docs are so outdated. I followed all of the samples, and nothing worked.
The samples use the gradle application plugin, and so it should be possible to run by typing ./gradlew run
in the directory containing the project (i.e. hellofx). While compilation succeeds, running fails. The build.gradle should be changed to add Openjfx dependencies to the run configuration.
Example output:
axel@xiaolong hellofx % ./gradlew build
BUILD SUCCESSFUL in 1s
5 actionable tasks: 5 executed
axel@xiaolong hellofx % ./gradlew run
> Task :run FAILED
Loading library prism_es2 from resource failed: java.lang.UnsatisfiedLinkError: /Users/axel/.openjfx/cache/13/libprism_es2.dylib: dlopen(/Users/axel/.openjfx/cache/13/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/axel/.openjfx/cache/13/libprism_es2.dylib: code signature in (/Users/axel/.openjfx/cache/13/libprism_es2.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
java.lang.UnsatisfiedLinkError: /Users/axel/.openjfx/cache/13/libprism_es2.dylib: dlopen(/Users/axel/.openjfx/cache/13/libprism_es2.dylib, 1): no suitable image found. Did find:
/Users/axel/.openjfx/cache/13/libprism_es2.dylib: code signature in (/Users/axel/.openjfx/cache/13/libprism_es2.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
at java.base/java.lang.Runtime.load0(Runtime.java:765)
at java.base/java.lang.System.load(System.java:1866)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)
at javafx.graphics/com.sun.prism.es2.ES2Pipeline.lambda$static$0(ES2Pipeline.java:68)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:310)
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:332)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
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:835)
Loading library prism_sw from resource failed: java.lang.UnsatisfiedLinkError: /Users/axel/.openjfx/cache/13/libprism_sw.dylib: dlopen(/Users/axel/.openjfx/cache/13/libprism_sw.dylib, 1): no suitable image found. Did find:
/Users/axel/.openjfx/cache/13/libprism_sw.dylib: code signature in (/Users/axel/.openjfx/cache/13/libprism_sw.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
java.lang.UnsatisfiedLinkError: /Users/axel/.openjfx/cache/13/libprism_sw.dylib: dlopen(/Users/axel/.openjfx/cache/13/libprism_sw.dylib, 1): no suitable image found. Did find:
/Users/axel/.openjfx/cache/13/libprism_sw.dylib: code signature in (/Users/axel/.openjfx/cache/13/libprism_sw.dylib) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2617)
at java.base/java.lang.Runtime.load0(Runtime.java:765)
at java.base/java.lang.System.load(System.java:1866)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.installLibraryFromResource(NativeLibLoader.java:214)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryFromResource(NativeLibLoader.java:194)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibraryInternal(NativeLibLoader.java:135)
at javafx.graphics/com.sun.glass.utils.NativeLibLoader.loadLibrary(NativeLibLoader.java:53)
at javafx.graphics/com.sun.prism.sw.SWPipeline.lambda$static$0(SWPipeline.java:42)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:310)
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:332)
at javafx.graphics/com.sun.prism.GraphicsPipeline.createPipeline(GraphicsPipeline.java:218)
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:835)
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:244)
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:567)
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:835)
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:567)
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
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':run'.
> Process 'command '/Library/Java/JavaVirtualMachines/adoptopenjdk-12.jdk/Contents/Home/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 0s
3 actionable tasks: 2 executed, 1 up-to-date
This might go beyond the goal of these samples but, while I'm able to run them, I'm noticing that the scaling of the javaFX app doesn't match the OS:
Notice how the text in the Label
' is smaller than the window title or the code in the background (IntelliJ)
This is running on Ubuntu 18.04 with 200% scale (Settings -> Devices -> Displays), JDK 11 downloaded from here and jmods downloaded from here. I wonder if this is an issue with my set up, or there's a missing flag/setting in the sample code that needs to be added.
Hey, can we have a proguard support added for this? I'm currently struggling to add proguard to the project.
When trying to run the gradlew version of hellofx with JDK 17, I got this error message:
Could not create an instance of type org.gradle.initialization.DefaultSettings_Decorated
The solution was to change the gradle version in gradle/wrapper/gradle-wrapper.properties from 5.0 to 7.5
(I can create a PR if you like).
I opened the project from samples-master\IDE\NetBeans\Modular\Java\ in Netbeans 11.1 with OpenJDK 13 and OpenJFX 13 on Windows 10.
I can compile it and actually run it using the generated batch file HelloFX\dist\jlink\HelloFX\bin\HelloFX.bat but I cannot launch it from Netbeans itself. When I click on the run or debug buttons, nothing happens...
Inconsistent package structure in the samples.
anti pattern
to use the default
package.cli
samples).Info:
https://docs.oracle.com/javase/tutorial/java/package/namingpkgs.html
I followed the instructions on how to set up a JavaFX project in NetBeans (Non-modular from IDE) https://openjfx.io/openjfx-docs/#IDE-NetBeans, but running the program did not work.
I added a global library, and added the JavaFX jar files as described in the guide. I then created a new project and added the global library to the compile classpath, and set the VM Options to the module path on my system --module-path /usr/share/openjfx/lib/ --add-modules javafx.controls
.
When running the program I got the error message java.lang.module.FindException: Module javafx.controls not found. It seems that NetBeans ignores the option --module-path in Project Settings / Run / VM Options. Instead, I added the JavaFX global library under Project Options / Libraries / Run / Modulepath, and only the option --add-modules javafx.controls
to VM Options. Doing so makes the program compile and run just fine.
I tried it both on Linux and Windows, and got the same error message and same solution. NetBeans 11.2, JDK 13, several different versions of openjfx.
When compiling and running the hello world JavaFX project from the command line with javac and java directly, --module-path works just fine, so it does not seem to be a problem with my installation.
Maybe you want to update the instructions in the guide.
Hi.
I have tried the examples for Netbeans:
The documentation for; Non-Modular from IDE is wrog, it misses to include in Project properties->Libraries->Run->ModulePath: JavaFX (from Libraries)
The examples for Non Modular fails the three (ant, maven, gradle)...
Title is pretty self explanatory, I've downloaded the non modular Maven sample and changed nothing except the javafx version in the pom.xml which I set to 19 instead of 16.
When I try to run it through javafx:run I get this
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.openjfx:hellofx >-------------------------
[INFO] Building hellofx 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> javafx-maven-plugin:0.0.6:run (default-cli) > process-classes @ hellofx >>>
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ hellofx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 3 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ hellofx ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< javafx-maven-plugin:0.0.6:run (default-cli) < process-classes @ hellofx <<<
[INFO]
[INFO]
[INFO] --- javafx-maven-plugin:0.0.6:run (default-cli) @ hellofx ---
[INFO] Toolchain in javafx-maven-plugin null
[ERROR] Command execution failed.
java.io.IOException: Cannot run program "java" (in directory "/home/johan/Desktop/hellofx"): error=2, No such file or directory
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1143)
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1073)
at java.lang.Runtime.exec (Runtime.java:615)
at org.apache.commons.exec.launcher.Java13CommandLauncher.exec (Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch (DefaultExecutor.java:279)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:567)
at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:434)
at org.openjfx.JavaFXRunMojo.execute (JavaFXRunMojo.java:105)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:577)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
Caused by: java.io.IOException: error=2, No such file or directory
at java.lang.ProcessImpl.forkAndExec (Native Method)
at java.lang.ProcessImpl.<init> (ProcessImpl.java:315)
at java.lang.ProcessImpl.start (ProcessImpl.java:245)
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1110)
at java.lang.ProcessBuilder.start (ProcessBuilder.java:1073)
at java.lang.Runtime.exec (Runtime.java:615)
at org.apache.commons.exec.launcher.Java13CommandLauncher.exec (Java13CommandLauncher.java:61)
at org.apache.commons.exec.DefaultExecutor.launch (DefaultExecutor.java:279)
at org.apache.commons.exec.DefaultExecutor.executeInternal (DefaultExecutor.java:336)
at org.apache.commons.exec.DefaultExecutor.execute (DefaultExecutor.java:166)
at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:567)
at org.openjfx.JavaFXBaseMojo.executeCommandLine (JavaFXBaseMojo.java:434)
at org.openjfx.JavaFXRunMojo.execute (JavaFXRunMojo.java:105)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
at jdk.internal.reflect.DirectMethodHandleAccessor.invoke (DirectMethodHandleAccessor.java:104)
at java.lang.reflect.Method.invoke (Method.java:577)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
at org.codehaus.classworlds.Launcher.main (Launcher.java:47)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.691 s
[INFO] Finished at: 2022-12-07T08:56:47+01:00
[INFO] ------------------------------------------------------------------------```
There is currently no explanation why the extra class hellofx.Launcher
is necessary to launch non-modular JavaFX programs. Why is it not possible to use hellofx.HelloFX
directly as main-class, why does that produce the error Error: JavaFX runtime components are missing, and are required to run this application
?
Because this isnt' properly documented, I spent a lot of time trying to figure out why I couldn't port my existing JavaFX-program..
After adding a module to build.gradle:
javafx {
version = "12"
modules = [ 'javafx.controls' ]
modules = [ 'javafx.media' ]
}
"./gradlew build" produces an error "package javafx.scene.control does not exist"
OS: centos 64, java 12.0.1
I followed the instructions as in https://openjfx.io/openjfx-docs/#IDE-Eclipse and the example runs fine from within Eclipse with ...javafx-sdk-14.0.1\lib beeing set as module path. Creating a custom runtime image using jlink --module-path "%PATH_TO_FX_MODS%;bin\hellofx" --add-modules=hellofx --output jre
produces the jre folder but failes to copy the javafx' dll files (at least prism_d3d.dll, glass.dll and javafx_font.dll) into the \bin subfolder. Without the dll's a
Graphics Device initialization failed for : d3d, sw
Error initializing QuantumRenderer: no suitable pipeline found
message is thrown. What could I be doing wrong?
Windows 10, OpenJDK 17.0.2, JavaFX 17.0.2,
Java directory:
D:\Program Files\Java\jdk-17.0.2\
JavaFX directory:
D:\Program Files\Java\jdk-17.0.2\javafx\
Set environment variable PATH:
PATH=D:\Program Files\Java\jdk-17.0.2\bin\
Set environment variable JAVA_HOME:
JAVA_HOME=D:\Program Files\Java\jdk-17.0.2\
Set environment variable PATH_TO_FX:
PATH_TO_FX=“D:\Program Files\Java\jdk-17.0.2\javafx\lib”
Test compilation:
samples-master\HelloFX\CLI\hellofx\HelloFX.java
javac --module-path %PATH_TO_FX% --add-modules javafx.controls HelloFX.java
Error message:
error: no source files
I confirm that HelloFX.java exists in the current directory. How come the error message says “no source files”?
The ReadMe isn't good readable.
endless
list of all samples.Suggestion for the new structure:
Description
.Content
contains a list from quick links (pointed to 3.) to all examples.License
.Contribution
.As for https://openjfx.io/openjfx-docs/#maven,
after running on macOS Sonoma,
mvn javafx:run
confront
com.sun.glass.ui.mac.MacApplication lambda$waitForReactivation$6
WARNING: Timeout while waiting for app reactivation
and blank pop-up window
Hello, JavaFX 20.0.2, running on Java 20.0.2
Seems relevant to https://stackoverflow.com/questions/77223963/javafx-window-takes-a-while-to-load-and-getting-an-error-in-eclipse. However, when I try to follow javafx-sdk-20.0.2
https://bugs.openjdk.org/browse/JDK-8315657
<javafx.version>20.0.2</javafx.version>
instead of
samples/HelloFX/Maven/hellofx/pom.xml
Line 13 in f44ca19
Hello, JavaFX 20.0.2, running on Java 20.0.2
The original issue exists MacOS Monterey
as well.
blank pop-up window
Hello, JavaFX 20.0.2, running on Java 20.0.2
but without
-- com.sun.glass.ui.mac.MacApplication lambda$waitForReactivation$6
-- WARNING: Timeout while waiting for app reactivation
How to add native codes?
I want to add c++ with javafx app using cmake .
How can I do this ?
Missing 'tags' in the GitHub project openjfx/samples.
Some suggestions for 'tags' for the GitHub project:
I compile project with Maven compiler:compile, after that i want to run project with javafx:run. Then error comes up: Caused by: java.lang.IllegalStateException: Location is not set.
at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459)
I do not know why but project didn't see the ".fxml" files.
In modular version, I am unable to import java.sql.* , I just see red line on my IDE and when I compile, I get error. java.sql is not in visibile to helloFX . In non-modular build, I can import java.sql.* . Please help me
The file
samples/IDE/IntelliJ/Modular/Java/hellofx/hellofx/src/org/openjfx/styles.css
has css for .button but the fxml has a Label.
When running the 'Debug' task in Netbeans 9.0 with config
I get the following error:
> Task :debug
Listening for transport dt_socket at address: 5005
Error: JavaFX runtime components are missing, and are required to run this application
So it seems the following section in build.gradle doesn't also work for 'Debug'?
run {
doFirst {
jvmArgs = [
'--module-path', classpath.asPath,
'--add-modules', 'javafx.controls'
]
}
}
Hello,
The example for Intellij + modular + Gradle does not start when invoked directly from IntelliJ. It does not find the fxml file here:
Parent root = FXMLLoader.load(getClass().getResource("scene.fxml"));
and throws a NPE.
Is there a way to fix this with the Gradle setup? Starting the application with gradlew run
works, but then I don't have a debugger support and it is not straightforward.
I think the problem is that the resource files are build to a different output directory (build/classes
and build/resources
), but IntelliJ does not merge the directories.
I've imported the project into IntelliJ on Windows 7, set JDK 12 as the Gradle and the Project SDK, but did not do any other changes.
I tried to follow the example:
https://github.com/openjfx/samples/tree/master/CommandLine/Modular/Maven
it says:
To create and run a custom JRE:
cd CommandLine/Modular/Maven/hellofx
mvn clean javafx:jlink
This is the result:
$ mvn clean javafx:jlink
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.openjfx:hellofx >-------------------------
[INFO] Building demo 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hellofx ---
[INFO] Deleting $USER/git/openjfx-samples/HelloFX/Maven/hellofx/target
[INFO]
[INFO] --- javafx-maven-plugin:0.0.3:jlink (default-cli) @ hellofx ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory $USER/git/openjfx-samples/HelloFX/Maven/hellofx/src/main/resources
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to $USER/git/openjfx-samples/HelloFX/Maven/hellofx/target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.038 s
[INFO] Finished at: 2020-04-17T13:55:50+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.3:jlink (default-cli) on project hellofx: Error: jlink requires a module descriptor -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Using
Maven
$ mvn -version
Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.6, vendor: Eclipse OpenJ9, runtime: $USER/.jabba/jdk/[email protected]
Default locale: en_GB, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-21-generic", arch: "amd64", family: "unix"
Java
$ java -version
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.6+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.18.1, JRE 11 Linux amd64-64-Bit Compressed References 20200122_441 (JIT enabled, AOT enabled)
OpenJ9 - 51a5857d2
OMR - 7a1b0239a
JCL - da35e0c380 based on jdk-11.0.6+10)
I'm just trying to get a simple application up and running from an actual build. I thought the project here might provide a working example, but it turns out that it builds a non-working distribution.
Reproduction:
> git clone https://github.com/openjfx/samples
> cd samples\HelloFX\Gradle\hellofx
> set JAVA_HOME="c:\Program Files\Java\jdk-11.0.3"
> gradlew distZip
> cd build\distributions
> unzip hellofx.zip
> cd hellofx\bin
> hellofx.bat
Result:
Error: JavaFX runtime components are missing, and are required to run this application
Am I doing something wrong? I was under the impression that the JavaFX jars fetched via Gradle would be the components it's supposed to be using.
to take into account Gradle 6.4+ for JDK 14+ and the recently published JavaFX gradle plugin 0.0.9
It points to apache right now: https://github.com/openjfx/samples/blob/master/HelloFX/Maven/hellofx/pom.xml#L9
when running the command mvn clean javafx:run
mvn clean javafx:run
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------< org.openjfx:hellofx >-------------------------
[INFO] Building demo 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ hellofx ---
[INFO]
[INFO] --- javafx-maven-plugin:0.0.3:run (default-cli) @ hellofx ---
[WARNING] Error injecting: org.openjfx.JavaFXRunMojo
java.lang.TypeNotPresentException: Type org.openjfx.JavaFXRunMojo not present
at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:147)
at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.UnsupportedClassVersionError: org/openjfx/JavaFXRunMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1 (Native Method)
at java.lang.ClassLoader.defineClass (ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass (SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass (URLClassLoader.java:468)
at java.net.URLClassLoader.access$100 (URLClassLoader.java:74)
at java.net.URLClassLoader$1.run (URLClassLoader.java:369)
at java.net.URLClassLoader$1.run (URLClassLoader.java:363)
at java.security.AccessController.doPrivileged (Native Method)
at java.net.URLClassLoader.findClass (URLClassLoader.java:362)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClassFromSelf (ClassRealm.java:425)
at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass (SelfFirstStrategy.java:42)
at org.codehaus.plexus.classworlds.realm.ClassRealm.unsynchronizedLoadClass (ClassRealm.java:271)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:247)
at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass (ClassRealm.java:239)
at org.eclipse.sisu.space.URLClassSpace.loadClass (URLClassSpace.java:139)
at org.eclipse.sisu.space.NamedClass.load (NamedClass.java:46)
at org.eclipse.sisu.space.AbstractDeferredClass.get (AbstractDeferredClass.java:48)
at com.google.inject.internal.ProviderInternalFactory.provision (ProviderInternalFactory.java:85)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.provision (InternalFactoryToInitializableAdapter.java:57)
at com.google.inject.internal.ProviderInternalFactory$1.call (ProviderInternalFactory.java:66)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:112)
at com.google.inject.internal.ProvisionListenerStackCallback$Provision.provision (ProvisionListenerStackCallback.java:127)
at com.google.inject.internal.ProvisionListenerStackCallback.provision (ProvisionListenerStackCallback.java:66)
at com.google.inject.internal.ProviderInternalFactory.circularGet (ProviderInternalFactory.java:61)
at com.google.inject.internal.InternalFactoryToInitializableAdapter.get (InternalFactoryToInitializableAdapter.java:47)
at com.google.inject.internal.InjectorImpl$1.get (InjectorImpl.java:1050)
at org.eclipse.sisu.inject.Guice4$1.get (Guice4.java:162)
at org.eclipse.sisu.inject.LazyBeanEntry.getValue (LazyBeanEntry.java:81)
at org.eclipse.sisu.plexus.LazyPlexusBean.getValue (LazyPlexusBean.java:51)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:263)
at org.codehaus.plexus.DefaultPlexusContainer.lookup (DefaultPlexusContainer.java:255)
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getConfiguredMojo (DefaultMavenPluginManager.java:520)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:124)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke (Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.835 s
[INFO] Finished at: 2020-11-12T09:35:28+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.openjfx:javafx-maven-plugin:0.0.3:run (default-cli) on project hellofx: Execution default-cli of goal org.openjfx:javafx-maven-plugin:0.0.3:run failed: Unable to load the mojo 'run' in the plugin 'org.openjfx:javafx-maven-plugin:0.0.3' due to an API incompatibility: org.codehaus.plexus.component.repository.exception.ComponentLookupException: org/openjfx/JavaFXRunMojo has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.openjfx:javafx-maven-plugin:0.0.3
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/Alexandre/.m2/repository/org/openjfx/javafx-maven-plugin/0.0.3/javafx-maven-plugin-0.0.3.jar
[ERROR] urls[1] = file:/C:/Users/Alexandre/.m2/repository/javax/enterprise/cdi-api/1.0/cdi-api-1.0.jar
[ERROR] urls[2] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/plexus/plexus-utils/3.1.0/plexus-utils-3.1.0.jar
[ERROR] urls[3] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/plexus/plexus-java/0.9.11/plexus-java-0.9.11.jar
[ERROR] urls[4] = file:/C:/Users/Alexandre/.m2/repository/org/ow2/asm/asm/7.0-beta/asm-7.0-beta.jar
[ERROR] urls[5] = file:/C:/Users/Alexandre/.m2/repository/com/thoughtworks/qdox/qdox/2.0-M9/qdox-2.0-M9.jar
[ERROR] urls[6] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/plexus/plexus-archiver/3.6.0/plexus-archiver-3.6.0.jar
[ERROR] urls[7] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/plexus/plexus-io/3.0.1/plexus-io-3.0.1.jar
[ERROR] urls[8] = file:/C:/Users/Alexandre/.m2/repository/commons-io/commons-io/2.6/commons-io-2.6.jar
[ERROR] urls[9] = file:/C:/Users/Alexandre/.m2/repository/org/apache/commons/commons-compress/1.16.1/commons-compress-1.16.1.jar
[ERROR] urls[10] = file:/C:/Users/Alexandre/.m2/repository/org/objenesis/objenesis/2.6/objenesis-2.6.jar
[ERROR] urls[11] = file:/C:/Users/Alexandre/.m2/repository/org/iq80/snappy/snappy/0.4/snappy-0.4.jar
[ERROR] urls[12] = file:/C:/Users/Alexandre/.m2/repository/org/tukaani/xz/1.8/xz-1.8.jar
[ERROR] urls[13] = file:/C:/Users/Alexandre/.m2/repository/org/apache/commons/commons-exec/1.3/commons-exec-1.3.jar
[ERROR] urls[14] = file:/C:/Users/Alexandre/.m2/repository/org/twdata/maven/mojo-executor/2.3.0/mojo-executor-2.3.0.jar
[ERROR] urls[15] = file:/C:/Users/Alexandre/.m2/repository/org/slf4j/slf4j-simple/1.7.22/slf4j-simple-1.7.22.jar
[ERROR] urls[16] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/plexus/plexus-interpolation/1.25/plexus-interpolation-1.25.jar
[ERROR] urls[17] = file:/C:/Users/Alexandre/.m2/repository/org/sonatype/plexus/plexus-sec-dispatcher/1.4/plexus-sec-dispatcher-1.4.jar
[ERROR] urls[18] = file:/C:/Users/Alexandre/.m2/repository/org/sonatype/plexus/plexus-cipher/1.4/plexus-cipher-1.4.jar
[ERROR] urls[19] = file:/C:/Users/Alexandre/.m2/repository/org/apache/maven/maven-builder-support/3.6.0/maven-builder-support-3.6.0.jar
[ERROR] urls[20] = file:/C:/Users/Alexandre/.m2/repository/org/apache/maven/resolver/maven-resolver-util/1.3.1/maven-resolver-util-1.3.1.jar
[ERROR] urls[21] = file:/C:/Users/Alexandre/.m2/repository/org/apache/maven/shared/maven-shared-utils/3.2.1/maven-shared-utils-3.2.1.jar
[ERROR] urls[22] = file:/C:/Users/Alexandre/.m2/repository/org/eclipse/sisu/org.eclipse.sisu.inject/0.3.3/org.eclipse.sisu.inject-0.3.3.jar
[ERROR] urls[23] = file:/C:/Users/Alexandre/.m2/repository/com/google/inject/guice/4.2.1/guice-4.2.1-no_aop.jar
[ERROR] urls[24] = file:/C:/Users/Alexandre/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar
[ERROR] urls[25] = file:/C:/Users/Alexandre/.m2/repository/com/google/guava/guava/25.1-android/guava-25.1-android.jar
[ERROR] urls[26] = file:/C:/Users/Alexandre/.m2/repository/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar
[ERROR] urls[27] = file:/C:/Users/Alexandre/.m2/repository/org/checkerframework/checker-compat-qual/2.0.0/checker-compat-qual-2.0.0.jar
[ERROR] urls[28] = file:/C:/Users/Alexandre/.m2/repository/com/google/errorprone/error_prone_annotations/2.1.3/error_prone_annotations-2.1.3.jar
[ERROR] urls[29] = file:/C:/Users/Alexandre/.m2/repository/com/google/j2objc/j2objc-annotations/1.1/j2objc-annotations-1.1.jar
[ERROR] urls[30] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/mojo/animal-sniffer-annotations/1.14/animal-sniffer-annotations-1.14.jar
[ERROR] urls[31] = file:/C:/Users/Alexandre/.m2/repository/org/codehaus/plexus/plexus-component-annotations/1.7.1/plexus-component-annotations-1.7.1.jar
[ERROR] urls[32] = file:/C:/Users/Alexandre/.m2/repository/org/apache/commons/commons-lang3/3.8.1/commons-lang3-3.8.1.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import from realm ClassRealm[maven.api, parent: null]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginContainerException
PS C:\Users\Alexandre\Downloads\samples-master\samples-master\HelloFX\Maven\hellofx>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.