не работает сборка Jar приложения JavaFX с коннектором MySQL!

Подскажите пожалуйста кто знает! Уже кипятком... плююсь. Создал в Intellij Idea сборку jar программы JavaFX. В самой IDE работает на ура! Добавил в сборку коннектор mysql-connector-java-8.0.21.jar (в проект добавлял вручную). Создал jar, но она в консоли запускается вот с такой ошибкой! 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(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(Unknown Source) at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication(Unknown Source) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.base/java.lang.reflect.Method.invoke(Unknown Source) at java.base/sun.launcher.LauncherHelper$FXHelper.main(Unknown Source) Caused by: java.lang.RuntimeException: Exception in Application start method at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(Unknown Source) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(Unknown Source) at java.base/java.lang.Thread.run(Unknown Source) Caused by: java.lang.NoClassDefFoundError: java/sql/SQLException at java.base/java.lang.Class.getDeclaredConstructors0(Native Method) at java.base/java.lang.Class.privateGetDeclaredConstructors(Unknown Source) at java.base/java.lang.Class.getConstructor0(Unknown Source) at java.base/java.lang.Class.newInstance(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processAttribute(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.processAttribute(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader$Element.processStartElement(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader$ValueElement.processStartElement(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.processStartElement(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.loadImpl(Unknown Source) at javafx.fxml/javafx.fxml.FXMLLoader.load(Unknown Source) at sample.Main.start(Main.java:17) at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source) at java.base/java.security.AccessController.doPrivileged(Unknown Source) at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source) at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source) at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source) ... 1 more Caused by: java.lang.ClassNotFoundException: java.sql.SQLException at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source) at java.base/java.lang.ClassLoader.loadClass(Unknown Source) ... 27 more Exception running application sample.Main

Помогите пожалуйста! Как это исправить?

Ответы (0 шт):