zamb0 / Progetto-D22

Progetto studenti (gruppo ArrayIndexOutOfBoundsException)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Progetto-D22

Java JavaFX MySQL

Progetto studenti (gruppo ArrayIndexOutOfBoundsException)

TRENISSIMO

Setup iniziale database

  1. Installare MySQL Server e MySQL Workbench sulla propria macchina
  2. Accedere all'istanza database locale
  3. Utilizzando MySQL Workbench, importare il file dump ./resources/trenissimo_db_dump.sql (Server -> Data Import -> Import from Self-Contained File)
  4. Procedere con Start Import
  5. Modificare adeguatamente gli elementi property nel file ./src/hibernate.cfg.xml

Setup iniziale progetto

  1. Prima di eseguire l'entrypoint Trenissimo aggiungere le VM options:

    (IntelliJ: Edit Configurations -> Trenissimo -> Modify options -> Add VM options) (Eclipse: Run -> Run Configurations -> Arguments -> VM arguments)

    --add-exports
    javafx.graphics/com.sun.javafx.scene=com.jfoenix
    --add-exports
    javafx.controls/com.sun.javafx.scene.control.behavior=com.jfoenix
    --add-exports
    javafx.controls/com.sun.javafx.scene.control=com.jfoenix
    --add-exports
    javafx.base/com.sun.javafx.binding=com.jfoenix
    --add-exports
    javafx.base/com.sun.javafx.event=com.jfoenix
    --add-exports
    javafx.graphics/com.sun.javafx.stage=com.jfoenix
    --add-opens=java.base/java.lang.reflect=com.jfoenix
    --add-exports
    javafx.base/com.sun.javafx.runtime=org.controlsfx.controls
    --add-exports
    javafx.controls/com.sun.javafx.scene.control.behavior=org.controlsfx.controls
    --add-exports
    javafx.controls/com.sun.javafx.scene.control.inputmap=org.controlsfx.controls
    --add-exports
    javafx.graphics/com.sun.javafx.scene.traversal=org.controlsfx.controls
    
  2. Selezionare come "main class" la classe it/unipv/po/aioobe/trenissimo/Trenissimo.java

  3. Premere il tasto Run

  4. In Eclipse sussiste un problema probabilmente relativo all'Encoding UTF-8 che visualizza "€" con "€". Per risolvere la cosa:

    1. Go to Window->Preferences->General->Content Types
    2. Select "Text" at the top tree-list.
    3. Specify "UTF8" in the bottom text box labeled "Default encoding".
    4. Click on the "Update" button.
    5. Select "Java Class File" at the top tree-list.
    6. Repeat (3) and (4)
    7. Click OK to save preferences.

    Recarsi nel file src/main/java/it/unipv/po/aioobe/trenissimo/model/titolodiviaggio/enumeration/ValoreVoucher.java e sostuire "€" con "€"

ATTENZIONE!

In caso si abbia un dispositivo con processore Apple Silicon è necessario utilizzare la versione 19-ea+3 di javafx. In particolare è necessario modificare in questo modo il file pom.xml:

<dependencies>
     ...
     <dependency>
          <groupId>org.openjfx</groupId>
          <artifactId>javafx-controls</artifactId>
          <version>19-ea+3</version>
     </dependency>
     <dependency>
          <groupId>org.openjfx</groupId>
          <artifactId>javafx-fxml</artifactId>
          <version>19-ea+3</version>
     </dependency>
     ...
</dependencies>

e successivamente fare il load dei cambiamenti (Load Maven Changes).

PRESENTAZIONE

Presentazione Progetto

About

Progetto studenti (gruppo ArrayIndexOutOfBoundsException)

License:MIT License


Languages

Language:Java 99.2%Language:CSS 0.8%