MattNYC
Posts: 1
Joined: Fri Jul 12, 2019 3:10 am

Booting into a java app without a full OS

Fri Jul 12, 2019 3:21 am

Looking for some help.

I have an idea for a kiosk app using the RPi 4 (4gb) and am trying to make something in java that will use the RPi camera and a NFC reader, IR touch screen frame, also connect to a VM instance on Google Compute Engine to pull updates and to allow some remote syncing. I need a database of users to reference with NFC card touches and I'm not sure if this would be best hosted locally or in the GCE.

I'd prefer to stay away from booting the Pi into Chromium (I tested it and it works with displaying a page but I'd like to lock it down more and try and build a tighter app with a Java window that displays different content depending on the mode it's in).

Most of the modes are flushed out on paper but I am now at square 1 with learning Java !!

So the first question I have at the start of this journey is if I only need the Pi to boot into my java app, do I need the full Raspbian OS or how should I prepare the SD card to go to a command prompt initially and when I have the Java file on there to boot directly into the Java app? I'm thinking that this must be the best way to run the kiosk to avoid unneeded processes running in the background.

Can anyone point me in the right direction for this?

User avatar
topguy
Posts: 5624
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Booting into a java app without a full OS

Fri Jul 12, 2019 10:47 am

If the Java APP has a GUI it needs to render that UI on something. Simplest way is to use X-windows, but you can start your app in "kiosk-mode" so that you dont need to load the "desktop". That saves on memory and resources.

You can either use the full Raspbian OS and just disable automatic boot to desktop.
Or you can install Raspbian Lite and then install just the X-server components you need.

There are a few earlier threads on the same subject, some of them are quite old, so information in them might be outdated.
- https://www.raspberrypi.org/forums/view ... hp?t=54025
- https://raspberrypi.stackexchange.com/q ... pplication
- https://superuser.com/questions/1229137 ... -in-debian

Return to “Beginners”