如何解决尝试从intellij用Java 8提取jar文件时出现错误
我正在尝试使用 fontawesomefx-8.92 , jfoenix 和 sqlite-JDBC-3.27.2.12 ,使用这种方法:
File > Project Structure > artifacts > Add;
,如果我从运行
out > artifacts > DemoCreditApp_jar > DemoCreditApp.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:
com/sun/javafx/css/converters/PaintConverter
at com.jfoenix.controls.JFXTextField$StyleableProperties.<clinit>(JFXTextField.java:212)
at com.jfoenix.controls.JFXTextField.<init>(JFXTextField.java:163)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(UnkNown
Source)
at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(UnkNown
Source)
at java.base/java.lang.reflect.Constructor.newInstance(UnkNown Source)
at java.base/java.lang.class.newInstance(UnkNown Source)
at javafx.fxml/javafx.fxml.FXMLLoader$InstanceDeclarationElement.constructValue(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.load(UnkNown Source)
at Views.Main.start(Main.java:27)
at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(UnkNown
Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(UnkNown
Source)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(UnkNown
Source)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(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: com.sun.javafx.css.converters.PaintConverter
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)
...23 more Exception running application Views.Main
package Views;
import Controllers.PagePrincipaleController;
import Controllers.sqliteConnection;
import Controllers.Values;
import Models.Patient;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.control.TableView;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;
/**
* Created by Amine Daikha
*/
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception {
Values.sqliteConnection = new sqliteConnection();
Values.courentPatient = new Patient();
Values.tableInfo = new TableView<Patient>();
FXMLLoader fxmlLoader = new FXMLLoader(Main.class.getResource("PagePrincipaleView.fxml"));
AnchorPane pane = fxmlLoader.load();
PagePrincipaleController pagePrincipaleController = fxmlLoader.getController();
pagePrincipaleController.setMain(this);
//fxmlLoader = new FXMLLoader(new File("src/Views/PagePrincipaleView.fxml").toURI().toURL());
//Parent root = null;
//root = fxmlLoader.load(getClass().getResource("..\\Views\\PagePrincipaleView.fxml").openStream());
//Parent root = FXMLLoader.load(getClass().getResource("PagePrincipaleView.fxml"));
//Parent root = FXMLLoader.load(getClass().getResource("Views\\ScrollesPaneView.fxml"));
primaryStage.setTitle("Transactions Commerciales");
primaryStage.setScene(new Scene(pane,1050,570));
primaryStage.setMaxWidth(1065);
primaryStage.setMaxHeight(600);
primaryStage.show();
Values.pagePrincipaleSage = primaryStage;
}
public static void main(String[] args) {
launch(Main.class,args);
}
}
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<?import com.jfoenix.controls.JFXTextField?>
<?import com.jfoenix.controls.JFXButton?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import com.jfoenix.controls.JFXComboBox?>
<AnchorPane fx:id="pagePrincipale" prefheight="550.0" prefWidth="1050.0" xmlns="http://javafx.com/javafx/8.0.111" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controllers.PagePrincipaleController">
<children>
<TabPane prefheight="570.0" prefWidth="1050.0" tabClosingPolicy="UNAVAILABLE">
<tabs>
<Tab text="CLIENTS">
<content>
<AnchorPane layoutX="-1.0" minHeight="0.0" minWidth="0.0" prefheight="180.0" prefWidth="200.0">
<children>
<HBox layoutX="210.0" prefheight="430.0" prefWidth="841.0">
<children>
<TableView fx:id="tableInfo" prefheight="430.0" prefWidth="841.0">
<columns>
<TableColumn fx:id="idCol" prefWidth="150.0" text="Numéro de téléphone" />
<TableColumn fx:id="nomCol" prefWidth="158.0" text="Nom" />
<TableColumn fx:id="prenomCol" prefWidth="211.0" text="Prénom" />
<TableColumn fx:id="dateCol" prefWidth="163.0" text="Date de dernier opération" />
<TableColumn fx:id="prixColA" minWidth="4.0" prefWidth="157.0" text="Endettement actuel (DA)" />
</columns>
</TableView>
</children>
</HBox>
<VBox prefheight="437.0" prefWidth="210.0">
<children>
<JFXTextField fx:id="rechercherClient" onAction="#rechercherClientAction" promptText="Rechercher un client">
<VBox.margin>
<Insets bottom="20.0" left="4.0" right="4.0" top="20.0" />
</VBox.margin>
</JFXTextField>
<Label prefheight="35.0" prefWidth="210.0" text="Ajouter nouveau Client">
<VBox.margin>
<Insets bottom="25.0" top="20.0" />
</VBox.margin>
<font>
<Font size="18.0" />
</font>
<padding>
<Insets left="12.0" right="10.0" />
</padding>
</Label>
<JFXTextField fx:id="numTel" promptText="Numéro de téléphone">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelNumTel" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="15.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
<JFXTextField fx:id="nomClient" promptText="Nom">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelNom" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="15.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
<JFXTextField fx:id="prenomClient" layoutX="10.0" layoutY="90.0" promptText="Prénom">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelPrenom" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="15.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
<JFXTextField fx:id="prixInitialClient" promptText="Valeur de Credit">
<VBox.margin>
<Insets bottom="7.0" left="4.0" right="4.0" />
</VBox.margin>
</JFXTextField>
<Label fx:id="errLabelPrix" textFill="#ee0a0a">
<VBox.margin>
<Insets bottom="20.0" left="13.0" right="4.0" />
</VBox.margin>
</Label>
</children>
</VBox>
<JFXButton fx:id="effacerBtn" layoutX="830.0" layoutY="448.0" onAction="#effacer" prefheight="40.0" prefWidth="190.0" style="-fx-background-color: #0fc4e4;" text="Effacer endettements" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<JFXButton fx:id="modifierBtn" layoutX="530.0" layoutY="448.0" onAction="#modifier" prefheight="40.0" prefWidth="190.0" style="-fx-background-color: #0fc4e4;" text="Modifier" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<Label fx:id="errLabelClick" layoutX="526.0" layoutY="488.0" prefheight="40.0" textFill="#bc0606">
<font>
<Font size="14.0" />
</font>
</Label>
<JFXButton fx:id="infoDetailleBtn" layoutX="226.0" layoutY="448.0" onAction="#infoDetaille" prefheight="40.0" prefWidth="190.0" style="-fx-background-color: #0fc4e4;" text="Transactions" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font></JFXButton>
<JFXButton fx:id="ajouterClientBtn" layoutX="5.0" layoutY="424.0" onAction="#ajouterClient" prefheight="38.0" prefWidth="195.0" style="-fx-background-color: #0e9615;" text="Ajouter" textFill="WHITE">
<font>
<Font name="System Bold" size="15.0" />
</font>
</JFXButton>
<FontAwesomeIconView glyphName="EDIT" layoutX="685.0" layoutY="475.0" size="18.0" text="" />
<FontAwesomeIconView fill="#dd0d0d" glyphName="REMOVE" layoutX="1003.0" layoutY="475.0" size="18.0" text="" />
<FontAwesomeIconView fill="WHITE" glyphName="PLUS" layoutX="154.0" layoutY="451.0" size="18.0" text="" wrappingWidth="23.142857551574707" />
<FontAwesomeIconView fill="#14860c" glyphName="ARROW_UP" layoutX="387.0" layoutY="470.0" />
<FontAwesomeIconView fill="#dd0d0d" glyphName="ARROW_DOWN" layoutX="376.0" layoutY="479.0" />
<FontAwesomeIconView fill="#dd0d0d" glyphName="POWER_OFF" layoutX="84.0" layoutY="518.0" onmousepressed="#ett" size="30.0" text="" wrappingWidth="20.714284896850586" />
<Label layoutX="906.0" layoutY="514.0" text="Amine DAIKHA © 2019" underline="true" />
</children>
</AnchorPane>
</content>
</Tab>
<Tab text="STATISTIQUES">
<content>
<AnchorPane minHeight="0.0" minWidth="0.0" prefheight="180.0" prefWidth="200.0">
<children>
<FontAwesomeIconView fill="#dd0d0d" glyphName="POWER_OFF" layoutX="84.0" layoutY="518.0" onKeypressed="#ett" onmousepressed="#ett" size="30.0" text="" wrappingWidth="32.714284896850586" />
<Label layoutX="105.0" layoutY="25.0" text="Totale d'endettements: ">
<font>
<Font size="18.0" />
</font>
</Label>
<Label fx:id="totalEndettments" layoutX="310.0" layoutY="25.0" text="DA">
<font>
<Font size="18.0" />
</font>
</Label>
<Label layoutX="105.0" layoutY="93.0" text="les clients qui n'ont pas payé leurs endettements il y a : ">
<font>
<Font size="16.0" />
</font>
</Label>
<TableView fx:id="tableInfo1" layoutX="105.0" layoutY="130.0" prefheight="113.0" prefWidth="841.0">
<columns>
<TableColumn fx:id="idCol1" prefWidth="150.0" text="Numéro de téléphone" />
<TableColumn fx:id="nomCol1" prefWidth="158.0" text="Nom" />
<TableColumn fx:id="prenomCol1" prefWidth="211.0" text="Prénom" />
<TableColumn fx:id="dateCol1" prefWidth="163.0" text="Date de dernier opération" />
<TableColumn fx:id="prixColA1" minWidth="4.0" prefWidth="157.0" text="Endettement actuel (DA)" />
</columns>
</TableView>
<TableView fx:id="tableInfo2" layoutX="105.0" layoutY="326.0" prefheight="113.0" prefWidth="841.0">
<columns>
<TableColumn fx:id="idCol2" prefWidth="150.0" text="Numéro de téléphone" />
<TableColumn fx:id="nomCol2" prefWidth="158.0" text="Nom" />
<TableColumn fx:id="prenomCol2" prefWidth="211.0" text="Prénom" />
<TableColumn fx:id="dateCol2" prefWidth="163.0" text="Date de dernier opération" />
<TableColumn fx:id="prixColA2" minWidth="4.0" prefWidth="157.0" text="Endettement actuel (DA)" />
</columns>
</TableView>
<Label layoutX="105.0" layoutY="289.0" text="les clients qui leurs endettements passent : ">
<font>
<Font size="16.0" />
</font>
</Label>
<JFXComboBox fx:id="temps" layoutX="518.0" layoutY="93.0" />
<JFXComboBox fx:id="largent" layoutX="421.0" layoutY="289.0" />
<Label layoutX="906.0" layoutY="514.0" text="Amine DAIKHA © 2019" underline="true" />
</children></AnchorPane>
</content>
</Tab>
</tabs>
</TabPane>
</children>
</AnchorPane>
我整整度过了一天,请指导我。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。