Home

Awesome

Title

Java UIO offers robust Java interfaces optimized for Linux Userspace IO, emphasizing high performance. Engineered from scratch, it leverages contemporary kernel APIs, libraries, and cutting-edge code generation methodologies, embodying a state-of-the-art cross-platform solution. Rather than reinventing established paradigms, Java UIO harnesses existing standards, avoiding redundant development commonly observed in other IO libraries. Seamlessly supporting JDK 21 LTS, this framework integrates Project Lombok to streamline code, enhancing readability and conciseness.


<img src="periphery/images/periphery.png" width="100"/><img src="u8g2/images/u8g2.jpg" width="100"/><img src="u8g2/images/java.png" width="100"/><img src="u8g2/images/sdl.png" width="100"/>


SBC configuration

Non-root access

Non-root access is provided by a systemd service called uio-permissions that applies permissions for GPIO, I2C, SPI, serial and system LEDs. GPIO sysfs (deprecated) and PWM permissions are provided by udev rules. Tweak uio-permissions.sh 98-sysfs.rules and 99-pwm.rules as needed.

Download project

Install script

The install script assumes a clean OS install. If you would like to install on a OS with your own version of Java 21, etc. then you can look at what install.sh does and do it manually. What does the script do?

Run script

How to work on Java UIO project

I'm using NetBeans to develop, but this is a standard Maven multi-module project. The easiest way to setup your environment is create a Ubuntu 22.04 desktop VM (VirtualBox, etc.) and follow install process since it installs JVM, Maven, all projects, etc. Then you just need to install NetBeans (or Eclipse, etc.). Since Java UIO relies on c-periphery and u8g2 those files are not included in the project. You can see them ignored in .gitignore.

Now you should be ready to compile the project with mvn clean install. To use NetBeans right-click Run on a program in Demo project modify project properties:

Now if you run SimpleText it will use SDL instead of a real display. You will need to tweak for Periphery demo programs as well. Basically look at the command line arguments in the examples provided.