From 54d03f0629abe6e246ede2d9fbca31851c11d52d Mon Sep 17 00:00:00 2001
From: Gitoffthelawn The first small problem was to get JavaFX running with Maven. Since i wanted to use the Logging-Framework Log4J, Maven was pretty easy to use and a good choice. Starting a JavaFX Application on a RaspberryPi isn't that easy, since Oracle removed JFX from their ARM install. If the GUI should be the size of the full display, but without using the fullscreen option Problem: On the Pi, the user.home/Desktop is not the Desktop you get displayed when starting up the Pi.
For a guy living in a rural area this is more than annoying.

@@ -25,13 +25,13 @@ I had this problem quite often and ended up buying the stuff i already had, whic
## Description
-This is a "small" personal project where i'll use Java, JavaFX, the Gson-Libary, Apache-Web-Server, JSON-server and Outpan.com as Barcode libary to fix this problem for me.
+This is a "small" personal project where I'll use Java, JavaFX, the Gson-Library, Apache-Web-Server, JSON-server and Outpan.com as Barcode library to fix this problem for me.
You can keep track of the items you have, the ones that are running out and the ones that are already empty.
You can print out an overview of the stocks or a list of items that are already out of stock.
If you're on the go, you can VPN into your home network and check which item and how many of them are still in stock.
I'll try to keep the setup costs as low as possible, so it'll be a system everyone can build.
-I have to admit, that it got more expensive than i thought. (You could decrease the price by just buying a Pi (35€) and a smaller screen (30-45€) to about 100€).
+I have to admit, that it got more expensive than I thought. (You could decrease the price by just buying a Pi (35€) and a smaller screen (30-45€) to about 100€).
Physical parts are:
- TaoTronics USB Laser-Barcodescanner (23€)
@@ -44,7 +44,7 @@ Physical parts are:
- Official Raspberry Pi 2A PSUn>
- HDMI cable
- Raspberry Pi Stickers
- - Tontec 7 inch High Resolution 1024 * 600 Screen Display LCD TFT Monitor(55€)
+ - Tontec 7 inch High Resolution 1024 * 600 Screen Display LCD TFT Monitor (55€)
------------------------------
Total costs: 178€
@@ -71,14 +71,14 @@ Total costs: 178€
Documentation of the problems with solutions
Running JavaFX with Maven
-Problem: Deploying JavaFX as .jar to be executed via the commanline
+Problem: Deploying JavaFX as .jar to be executed via the commandline
Solution: Using the "JavaFX Maven Plugin" from https://github.com/javafx-maven-plugin/javafx-maven-plugin and building the .jar file on a PC/MAC/Linux computer
Running the JavaFX .jar on PI
-Problem: Installing Java ARM and getting JavaFX seperately
+Problem: Installing Java ARM and getting JavaFX separately
Solution: Installing the latest Oracle Java ARM version, removing all the other Java installations (making sure the now installed one is used). Downloading the "JavaFX Embedded SDK" here: http://gluonhq.com/labs/javafxports/downloads/ and extracting the parts in the corresponding folders of the oracle Java version.
@@ -99,7 +99,7 @@ Total costs: 178€
Make the GUI resize for different screens without fullscreen
-Problem: Fullscreen makes the access to the Desktop harder, you might want to be able to access the Desktop while your GUI is runnign.
+Problem: Fullscreen makes the access to the Desktop harder, you might want to be able to access the Desktop while your GUI is running.
Solution: In your programcode, when setting up the primaryStage, set the size of your primaryScene to the dimensions of you display. You can do this with:
-Solution: You can create a soft link of the file on the user.home/Desktop to the file you created on your visible Desktop. Once your programm changes the user.home/Desktop file, since you linked them, the one on your visible Deskotp will also be changed. This is done like this:
If you realize, that your JavaFX Application is smaller and squished you should change the hdmi settings of the PI
+
If you realize, that your JavaFX Application is smaller and squished you should change the HDMI settings of the PI
Problem: The displayed resolution is smaller than the actual resolution your display is capable of
Solution: Take a look at https://www.raspberrypi.org/documentation/configuration/config-txt.md on how to change the displayed resolution. For me the solution was to change the hdmi_group -> 2 (since it's a monitor and not a TV) and then you just have to search the right resolution in the hdmi_mode table. For me it was hdmi_mode -> 16