COSC481W-2024Winter / StormStats

0 stars 0 forks source link

Deployment #5

Open sjiang1 opened 7 months ago

sjiang1 commented 7 months ago

User Story Neilo wants to use HeroStats but doesn't know anything about Java programming. To use HeroStats, he wants to install HeroStats easily so that he can use HeroStats right away.

Persona Neilo Feature Provide an installation package with an easy process Business Value Neilo can use HeroStats right away

Tasks

Acceptance Criteria

  1. The user can install HeroStats on their Windows laptop and use HeroStats with data stored locally.
sjiang1 commented 7 months ago

Over the Spring break, I tried for an hour to compile the project on MacOS, but I didn't make it work. Decided to avoid Mac for this project.

Today, I found one promising document for deployment: https://netbeans.apache.org/tutorial/main/kb/docs/java/javase-deploy/

sjiang1 commented 7 months ago

Export the Java application in Eclipse using "runnable JAR"

Image

The Jar was created but nothing happened after clicking the JAR file.

For an out of sync error: Image

Refreshing the project in Eclipse will fix this error.

sjiang1 commented 7 months ago

Figured out a way to run the runnable jar file from command line: java -jar C:HeroStats.jar

sjiang1 commented 7 months ago

Checked a video: https://www.youtube.com/watch?v=F8ahBtXkQzU for creating an executable jar file.

After generating the runnable JAR file, add JavaFX dll libraries into the JAR:

In Git Bash:

  1. Go to the JDK bin /c/Program Files/Java/jdk-19/bin
  2. ./jar.exe uf /c/Users/Siyuan\ Jiang/HeroStats/StormStats/runnable/HeroStats.jar /c/Users/Siyuan\ Jiang/eclipse/openjfx-21.0.2_windows-x64_bin-sdk/javafx-sdk-21.0.2/bin/*.dll
sjiang1 commented 7 months ago

Made a folder: src/resources/ to store the database file under the runnable. The jar was started but exited with the error:

Image