We currently have a PHP script to upload a file through a web browser to the web server, and then store the file's name/location in a MySQL database.
We need a simple Java application with no UI, just a terminal, which needs to listen for an added row in the MySQL database. When a new row is added, the program should automatically download the file from the file location stored in the MySQL database. This file then needs to be printed automatically, with no print dialogs. The raspberry pi will run on its own without a monitor, keyboard or mouse so everything must be done automatically. So when the user uploads a file through the PHP script, the raspberry pi should be able to print it instantly and automatically.
The printer we are using is a Star TSP800II thermal printer. I think this works in the same way to any other printer, but I'm not completely sure of this. Please could you look into this.
The database will be stored on a separate server, and not on the actual Raspberry Pi.