调试或运行应用程序时出现错误“创建JavaFX模块化项目并在intelliJ IDE中使用Gradle构建工具”

问题描述

我正在使用intelliJ IDE来构建项目,但是我在Debug中遇到此错误或在控制台窗口中运行该应用程序:

02:51:50: Executing task 'MainApp.main()'...


> Configure project :
Found module name 'mainfx.main'

> Task :compileJava UP-TO-DATE
> Task :processResources UP-TO-DATE
> Task :classes UP-TO-DATE

> Task :MainApp.main() Failed
Error: Could not find or load main class java
Caused by: java.lang.classNotFoundException: java

FAILURE: Build Failed with an exception.

* What went wrong:
Execution Failed for task ':MainApp.main()'.
> Process 'command 'C:/Program Files/Java/jdk-13.0.2/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

BUILD Failed in 24s
3 actionable tasks: 1 executed,2 up-to-date
Process 'command 'C:/Program Files/Java/jdk-13.0.2/bin/java.exe'' finished with non-zero exit value 1
02:52:15: Task execution finished 'MainApp.main()'.

Click here to see image

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)