Basic project for UV AI21 of UTC using Maven, AntLR and JavaFX (with Visual Studio Code).
Be careful: 1 clone 📦 = 1 star ✨
With git
git clone https://github.com/Dashstrom/tp-antlr.git
cd tp-antlr
Without git
Windows
windows + R -> "powershell" -> ctrl + shift + enter
.
Check if java is not already installed wih:
java -version
This will display your java version, which must be at least 11. If this is not the case, uninstall java before continuing.
Output example of a java version lower than 11:
java version "1.8.0_291"
Java(TM) SE Runtime Environment (build 1.8.0_291-b10)
Java HotSpot(TM) 64-Bit Server VM (build 25.291-b10, mixed mode)
Output example if java is not installed:
'java' is not recognized as an internal or external command, operable program or batch file.
After checking that your computer does not have java enter:
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
choco install openjdk
./mvnw.cmd dependency:sources
./mvnw.cmd clean compile exec:java
./mvnw.cmd clean package
The following warning can occur. You can ignore it.
[WARNING] Failed to build parent project for org.openjfx:javafx-...:jar:17
Ubuntu
chmod +x mvnw
sudo apt -y update && sudo apt -y install default-jdk
./mvnw dependency:sources
./mvnw clean compile exec:java
./mvnw clean package
The following warning can occur. You can ignore it.
[WARNING] Failed to build parent project for org.openjfx:javafx-...:jar:17
Mac
chmod +x mvnw
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
echo "export PATH=/opt/homebrew/bin:$PATH" >> ~/.bash_profile && source ~/.bash_profile
brew install java
./mvnw dependency:sources
./mvnw clean compile exec:java
./mvnw clean package
The following warning can occur. You can ignore it.
[WARNING] Failed to build parent project for org.openjfx:javafx-...:jar:17
java -jar target/ai21-antlr-1.0-jar-with-dependencies.jar
The following warning can occur, and you can ignore it see stackoverflow issue.
... com.sun.javafx.application.PlatformImpl startup
AVERTISSEMENT: Unsupported JavaFX configuration: classes were loaded from 'unnamed module @...'
Regenerate Maven wrapper (only if you know what you are doing).
mvn wrapper:wrapper -Dtype=script