Welcome to the Virtual Vending Machine!
This application simulates the core functions of a vending machine. With this machine, you will be able to unload various items in addition to restock the machine when you feel necessary. The machine offers a UI that allows you, the user, to see both the items available in each slot of the machine in addition to the number of items present in that particular slot.
- java SE 11+
- javaFX
First clone this repository into your local directories. To do so, you may run the following in your desired directory in your terminal:
git clone https://github.com/Atsubyo/vending-machine.git && cd vending-machine
For a zipped package, extract the folder contents into your desired directory location.
Setup will be different for Visual Studio Code and Eclipse. For running and compilation, please refer to the makefile documentation below.
-
Ensure that you have Visual Studio Code installed. Having the Java Extension Pack is recommended.
-
Ensure that your
.classpath
contains the correct file path to your javaFX installation. -
Add proper vmArgs to your launch.json
"vmArgs": "--module-path /file/path/to/javaFX/lib --add-modules javafx.controls,javafx.fxml"
-
Refer to the makefile documentation for compilation.
As an alternative to makefile and terminal based compilation for App.java
, you can run directly in Visual Studio Code with the Java Extension Pack
- Open the
App.java
file nested insrc/application/App.java
.
-
Ensure that you have Eclipse IDE installed. Having the e(fx)clipse extension is recommended, but not necessary to run this application.
-
Add javaFX libraries and setup run configurations for
App.java
. Follow this tutorial to set that up. -
Refer to the makefile documentation for compilation.
As an alternative to makefile and terminal based compilation for App.java
, you can run directly in the Eclipse IDE
-
Open the drop down menu on "Run". Drop down menu from opening the down arrow next to green run play button
-
Enter run configurations once again and go to the
App
item.
This application offers to main() components. There is the Debugger.java
that is used for testing and debugging the logic within the application. To run the application with its GUI, you must run with App.java
as the your main class. Use the makefile to differentiate which you want to run.
To compile Debugger.java
as the main class:
make build-debug
Default testing/debugging with Debugger.java
as the main class:
make run-debug
For testing/debugging with Debugger.java
as the main class with your own choice of file:
make run-debug-args directoryFile inputFile
For running the application with App.java
as the main class:
Not Available (Refer to the proceeding steps from earlier.)
- Implement App.java Execution via Makefile
- Generate Working Executable .jar with Makefile