错误:无法找到或加载主类sample.main javafx intellij idea

q35jwt9p  于 2021-09-29  发布在  Java
关注(0)|答案(0)|浏览(321)
Error: Could not find or load main class sample.Main
Caused by: java.lang.ClassNotFoundException: sample.Main

这是我的两个错误,我没有办法解决,我使用的是JavaFXSDK16,JDKversion16.0.1除了重新下载并重新安装它们之外,还有其他方法可以修复它吗?

"C:\Program Files\Java\jdk-16.0.1\bin\java.exe" -agentlib:jdwp=transport=dt_socket,address=,suspend=y,server=n --module-path C:/JavaFx/openjfx-16_windows-x64_bin-sdk/javafx-sdk-16/lib --add-modules javafx.controls,javafx.fxml -javaagent:C:\Users\ohmar\AppData\Local\JetBrains\IdeaIC2021.1\captureAgent\debugger-agent.jar -Dfile.encoding=UTF-8 -classpath "C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\src.zip;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx-swt.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.web.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.base.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.fxml.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.media.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.swing.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.controls.jar;C:\JavaFx\openjfx-16_windows-x64_bin-sdk\javafx-sdk-16\lib\javafx.graphics.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\lib\idea_rt.jar" sample.Main
Connected to the target VM, address: '', transport: 'socket'
Java HotSpot(TM) 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended
Error: Could not find or load main class sample.Main
Caused by: java.lang.ClassNotFoundException: sample.Main
Disconnected from the target VM, address: '', transport: 'socket'

Process finished with exit code 1

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题