Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Java UIO 2

Featured Replies

OK, so it actually was cold in FL for a couple weeks and I did a power hack. I ported Java UIO to Java UIO 2.

 

Java UIO (HawtJNI)

 

This was the "Old School" high-performance approach. It relied on a custom C wrapper and JNI to bridge the gap.

  • How it works: You have to write a C helper file, compile it into a shared library (.so) for on ARM architecture (armv7l, aarch64), and bundle it in your JAR.
  • The Overhead: Every call from Java to C has a "JNI transition cost." To minimize this, you used moveJavaToNative to bulk-transfer buffers, which added complexity to the Java code.

 

Java UIO 2 (FFM / Project Panama)

 

  • The "Modern" approach. It treats native memory and functions as first-class citizens in Java.
  • I now cross compile on x86_64 for arm32 and arm64.
  • How it works: Java uses Linker and SymbolLookup to find functions in u8g2 or libc directly. No custom C wrapper is strictly required unless you want to simplify complex macros.
  • The Overhead: Transitions are heavily optimized by the JVM (often inlined). By using MemorySegment, you can point Java directly at the UIO hardware registers or the U8g2 tile buffer.
  • The Armbian Advantage: It is "Write Once, Run Anywhere" for native code. As long as the system library (like libSDL2.so) exists on the Armbian filesystem, the same JAR will work on an Orange Pi 5, a Pine64, or even a Raspberry Pi without re-compiling C code.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.