Skip to content

Compile and Run the Application

CloudyYoung edited this page Mar 13, 2020 · 6 revisions

Introduction

This project does not use any build automation tools such as Maven, therefore, all the compiling works are depending on the IDEs. Different IDEs may have a different process of compile external reference libraries. Here, we provide the ways to properly compile and run the application in Visual Studio Code and Eclipse.

Java Versions

In order to properly running the project, you are required to install Java 9 or above.

Eclipse

Configuration procedure for JavaFX new

  • Go to Eclipse, open the project, and then open the Project Property panel.
  • Under the tab Run/Debug Settings 批注 2020-03-13 152639.png
  • Next, open the Main function for Main.java, and turn to the tab Arguments
  • Paste the following code into VM arguments:
--module-path "src/lib/javafx-sdk-11.0.2/lib" --add-modules=ALL-MODULE-PATH
  • Finally, it ends up looking like this. Click OK and you are ready to run! 批注 2020-03-13 152822.png

If the libs are not imported:

unknown.png You can read the article here to import all the .jar files under src/lib.

Visual Studio Code

Preparation

Before you run the code, please ensure all the conditions below are satisfied:

  • You have installed the plugin Java Extension Pack by Microsoft in your vscode.
  • The plugin is enabled. pack.png

Compiling and Running

By default, if you have cloned the repository code, you should be able to successfully compile and run the application by pressing F5 and select the Main function in Main.java. Note that it is the one in Main.java.

Error

If in an unexpected case, the external libraries are not compiling and cause errors, you will have to do the following steps to re-import the libraries:

  1. Find the Java Dependencies and Reference Libraries, and click the + button 1.png
  2. In the popup, go to directory src/lib and select all the .jar files 2.png

Clone this wiki locally