Empty Phrases is a fun JavaFX application that generates random, politician-like phrases using word fragments from a database. Think of it as a playful tool to create amusing, empty rhetoric—perfect for a lighthearted take on political speech. This project is inspired by the 1985 SFB Computerclub TV show, where similar concepts were explored using BASIC on a Commodore C64. Watch the inspiration here: SFB Computerclub 1985 Part 2.
This JavaFX project was developed using the Apache NetBeans 27 IDE (NetBeans 27).
Required frameworks:
- Java SDK (Java 24)
- SceneBuilder for GUI development (Gluon SceneBuilder)
- JavaFX SDK (JavaFX)
- Install Java 24 and ensure the
javacommand is accessible in your system's PATH. - Download and extract the JavaFX SDK to a known location (e.g.,
C:\javafx-sdk-24). - Optionally, install Apache NetBeans 27 for development or SceneBuilder for GUI editing.
- Download the project: Clone or download the repository to your local machine.
- Locate the JAR file: Find the
Empty_Phrases-1.0.0.jar(or similarly named) file in the project'stargetdirectory. - Copy dependencies: Ensure any required
libor resource folders are in the same directory as the JAR file.
Use the following batch file to launch Empty Phrases:
- Save the following as
run_emptyphrases.batin the same directory asEmpty_Phrases-1.0.0.jar:
@echo off
REM Batch file to launch the Empty Phrases JavaFX application
REM Set the path to the Empty Phrases JAR file
SET JAR_FILE=Empty_Phrases-1.0.0.jar
REM Set the path to the JavaFX SDK lib folder (update to match your JavaFX SDK location)
SET JAVAFX_LIB=C:\path\to\javafx-sdk-24\lib
REM Specify the main class (update if different or remove if specified in the JAR's manifest)
SET MAIN_CLASS=your.main.Main
REM Run the Empty Phrases application with required JavaFX modules
java --module-path "%JAVAFX_LIB%" --add-modules javafx.controls,javafx.fxml -jar %JAR_FILE% %MAIN_CLASS%
REM Pause to keep the window open for debugging (optional, remove if not needed)
pause- Update
JAVAFX_LIBto point to your JavaFX SDKlibfolder (e.g.,C:\javafx-sdk-24\lib). - If the main class is not specified in the JAR's manifest, update
MAIN_CLASSto the correct fully qualified class name (e.g.,your.main.Main). Otherwise, remove%MAIN_CLASS%from thejavacommand. - Double-click
run_emptyphrases.bator run it from the command prompt.
Use the following shell script to launch Empty Phrases:
- Save the following as
run_emptyphrases.shin the same directory asEmpty_Phrases-1.0.0.jar:
#!/bin/bash
# Script to launch the Empty Phrases JavaFX application
# Set the path to the Empty Phrases JAR file
JAR_FILE=Empty_Phrases-1.0.0.jar
# Set the path to the JavaFX SDK lib folder (update to match your JavaFX SDK location)
JAVAFX_LIB=/path/to/javafx-sdk-24/lib
# Specify the main class (update if different or remove if specified in the JAR's manifest)
MAIN_CLASS=your.main.Main
# Run the Empty Phrases application with required JavaFX modules
java --module-path "$JAVAFX_LIB" --add-modules javafx.controls,javafx.fxml -jar $JAR_FILE $MAIN_CLASS- Update
JAVAFX_LIBandMAIN_CLASSas needed. - Make the script executable:
chmod +x run_emptyphrases.sh. - Run the script:
./run_emptyphrases.sh.
- Launch the application using the batch or shell script.
- Generate random phrases through the graphical interface.
- Enjoy the humorous, politician-style output—perfect for a laugh!
