elabdesunil / draw-stepp-lines-javafx-basic-application

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Draw Stepped Lines - A basic JavaFX application

Requirement

  • Java Development Kit (JDK) download from here
  • JavaFX SDK, download from here

Running the program from Windows Powershell

  1. Add an environment variable that points to the lib directory. This step is optional really but it is more convenient.
$env:PATH_TO_FX="path-to-the-file"

example:

$env:PATH_TO_FX="C:\Projects\javafx-sdk-11.0.2\lib"

This will store the value in $env:PATH_TO_FX temporarily. To store it permanently, store it in the Environment Variables. Detailed Tutorial is here. Set the name PATH_TO_FX and value path to the lib instead of JAVA_HOME and its value.

  1. Compile the application. First navigate to the folder containing .fxml and .java files from powershell.
javac --module-path $env:PATH_TO_FX --add-modules javafx.controls,javafx.fxml *.java

This runs all .java files in the directory.

  1. Run the application
java --module-path $env:PATH_TO_FX --add-modules javafx.controls,javafx.fxml DrawSteppedLines

More detailed tutorial is here on setting up and running JavaFX applcation.

About


Languages

Language:Java 100.0%