I can't run main.
已回答
When I run the main, this error appears:
'C:\Users\mkoha\.jdks\corretto-21.0.3\bin\java.exe'' finished with non-zero exit value 1
请先登录再写评论。
Does it run without errors outside the IDE, in the command line?
Does it happen with different JDK versions?
Please share the sample project / full command line output: https://uploads.jetbrains.com.
Just this appears:
Execution failed for task ':run'.
> Process 'command 'C:\Users\mkoha\.jdks\corretto-21.0.3\bin\java.exe'' 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.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
BUILD FAILED in 439ms
2 actionable tasks: 1 executed, 1 up-to-date
Disable Gradle delegation and run directly via IntelliJ IDEA: https://i.imgur.com/HpeUaUE.png .
If it still doesn't work, please share the project.
I did it. This error appears:
C:\Users\mkoha\.jdks\corretto-21.0.3\bin\java.exe "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.1.3\lib\idea_rt.jar=53392:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2024.1.3\bin" -Dfile.encoding=UTF-8 -Dsun.stdout.encoding=UTF-8 -Dsun.stderr.encoding=UTF-8 -classpath C:\Users\mkoha\.jdks\corretto-21.0.3\bin\java.exe;C:\Users\mkoha\IdeaProjects\gruppe08\out\production\classes;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\org.xerial\sqlite-jdbc\3.45.3.0\6ae68e5fbf0d184c2f8191818fbe66e4dd70e14\sqlite-jdbc-3.45.3.0.jar;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\com.google.code.gson\gson\2.10.1\b3add478d4382b78ea20b1671390a858002feb6c\gson-2.10.1.jar;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\org.openjfx\javafx-fxml\22.0.1\e9bc66443f462933bd5ee27937669abcd916f605\javafx-fxml-22.0.1-win.jar;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\org.openjfx\javafx-controls\22.0.1\ba22d267afcb39741620c6cefd9d4a92405bcab9\javafx-controls-22.0.1-win.jar;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\org.slf4j\slf4j-api\1.7.36\6c62681a2f655b49963a5983b8b0950a6120ae14\slf4j-api-1.7.36.jar;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\org.openjfx\javafx-graphics\22.0.1\10ba6397b58cc946303eee1d05436f29c2797245\javafx-graphics-22.0.1-win.jar;C:\Users\mkoha\IdeaProjects\gruppe08\gradle\caches\modules-2\files-2.1\org.openjfx\javafx-base\22.0.1\a970f89174b87c6118bf54080bc5f83b9afb30e9\javafx-base-22.0.1-win.jar gui.Root
Fehler: Zum Ausführen dieser Anwendung benötigte JavaFX-Runtime-Komponenten fehlen
JavaFX dependencies are missing.
Please refer to https://www.jetbrains.com/help/idea/javafx.html and https://openjfx.io/openjfx-docs/ . This is not IDE specific issue.
If you still have problems, ask for help at https://stackoverflow.com/ after sharing a sample project on GitHub.
My project is creating game Blackjack and it is Bachelor project. My task is GUI of game. Unfortunately there is error again.
Make sure the project builds/runs from the command line Gradle outside the IDE.
This doesn't look like IDE issue, rather build configuration problem and missing system libraries/dependencies.