Tagged articles
JNI
58 articles · Page 1 of 1
This article details a systematic refactoring of a chat assistant Android app, applying SRP, DIP, OCP, layered architecture, and naming conventions to eliminate god classes and tight coupling, while uncovering a JNI symbol mismatch bug that only appears at runtime, and sharing insights on AI-assisted coding limitations.
AI-assisted codingAndroid developmentJNI
0 likes · 18 min read

StarRocks integrates Paimon C++ (paimon-cpp) to enable native C++ execution paths for querying Apache Paimon tables, eliminating JNI overhead, supporting primary key merges and delete handling, and achieving 1.4-3.4x speedups in benchmarks while reusing StarRocks' caching, memory management, and query profiling.
JNINative ExecutionPaimon
0 likes · 14 min read

StarRocks adopts Apache Paimon's C++ implementation (paimon-cpp) to replace JNI calls for primary-key merges and delete-vector handling, cutting cross-language overhead and reusing StarRocks' cache, memory management, and Query Profile; benchmarks show 1.4–3.4× speedups on primary-key counts and wide-table aggregations.
Apache PaimonJNINative Execution
0 likes · 14 min read


ITPUBSep 24, 2026 · Backend Development
Ctrip's JDK 25 upgrade revealed a silent data corruption bug in G1GC's Optional Evacuation phase, where pinned objects used by JNI critical sections (e.g., zstd-jni) were incorrectly moved, corrupting Parquet/ORC files without write-time errors; root cause traced to commit 86cec4ea and fixed via backport JDK-8377811.
G1GCJDK 25JNI
0 likes · 24 min read

This article explores major Java core library enhancements from versions 11 to 26, including the HTTP Client with HTTP/3 support, FFM API for safe native interop replacing JNI, Stream Gatherers for custom intermediate operations like sliding windows, SequencedCollection for unified ordered collections, KDF and post-quantum cryptography, plus numerous String, IO, and random-number improvements that reduce third-party dependencies.
FFM APIHTTP ClientHTTP/3
0 likes · 20 min read

This article explains the concept of edge computing, why models are deployed to devices, the advantages of using Python scripts on Android/iOS, and provides a step‑by‑step guide to implementing a Python interpreter, NumCpp integration, feature management, dynamic deployment, and business impact through real‑time strategy updates.
JNIdynamic deploymentmobile
0 likes · 15 min read

This article explains how to identify and resolve elusive Java memory leaks in cloud‑native Kubernetes pods by dissecting JVM, non‑JVM, and OS‑level memory usage, using Alibaba Cloud's SysOM diagnostic tools to pinpoint JNI and glibc allocation issues and apply concrete mitigation steps.
JNIJavaKubernetes
0 likes · 11 min read

When migrating automotive workloads to cloud-native containers, unexpected OOMKilled pods often hide a large amount of Java memory consumption caused by JNI, libc, and Transparent Huge Pages, which can be identified and resolved using the Alibaba Cloud OS Console's memory panorama analysis and hotspot tracing features.
Alibaba CloudJNIJava
0 likes · 11 min read

This article explains why Java applications in cloud containers often encounter OOMKilled pods, details the hidden memory consumption from JNI, libc, and Transparent Huge Pages, and demonstrates step‑by‑step how to use Alibaba Cloud OS Console's memory panorama analysis to identify and mitigate the root causes.
JNIKubernetesMemory Leak
0 likes · 11 min read

This guide explains why Java struggles with high‑performance or data‑intensive workloads, introduces GPU acceleration with CUDA, compares integration options such as JCuda, JNI, and JNA, walks through a practical encryption use case with performance benchmarks, and provides production‑grade best practices for memory, threading, testing, security, and deployment.
CUDAGPUHigh-Performance Computing
0 likes · 23 min read


JavaEdgeJun 28, 2025 · Backend Development
This guide explains why Java architects should understand CUDA, describes the GPU programming model, compares CPU and GPU designs, and details three practical ways—JNI, JCuda, and TornadoVM—to integrate CUDA acceleration into Java applications, with tips for using A100 GPUs effectively.
A100CUDAGPU
0 likes · 15 min read

This tutorial explains how a Kotlin backend can efficiently convert PDF pages to high-resolution PNG images by integrating the native PDFium library through a Rust-based JNI adapter, covering performance benefits, workflow steps, and complete code examples for building and invoking the native module.
JNIKotlinNative integration
0 likes · 11 min read

Learn how to integrate Go and Java by compiling Go code into a shared library, exposing functions via cgo and JNI, and invoking them from Java with detailed setup, code examples, handling of primitive and complex data types, and full build‑and‑run instructions.
GoInteroperabilityJNI
0 likes · 12 min read

This article explains Netty's powerful asynchronous architecture, compares classic multithread, Reactor, select, poll, and epoll I/O multiplexing models, demonstrates JNI integration for native performance, and provides complete example code for building a high‑performance epoll‑based server in Java.
BackendEpollIO Multiplexing
0 likes · 32 min read

This article provides a comprehensive introduction to Android NDK development, covering JNI fundamentals, data type mappings, method registration (static and dynamic), JNIEnv usage, CMake build configuration, and multiple practical code examples in Kotlin, C++, and C.
AndroidC++CMake
0 likes · 12 min read

This article explains Netty’s asynchronous architecture, compares classic multithread, Reactor, select, poll and epoll models, clarifies level‑triggered versus edge‑triggered event handling, and provides step‑by‑step JNI and hand‑written epoll server examples in C to illustrate high‑performance backend development.
C++EpollIO Multiplexing
0 likes · 33 min read

This article investigates why a large number of quality‑check mappings cause severe latency in a Java service, traces the slowdown to excessive asynchronous log printing, explains the Disruptor‑based async logger internals, evaluates stack‑trace location handling and JNI overhead, and proposes practical configuration and code‑level fixes.
DisruptorJNIJava
0 likes · 20 min read

The article investigates a severe performance bottleneck in a Java service caused by massive async Log4j2 logging, analyzes the Disruptor‑based async logger, explores JNI stack‑trace overhead, reproduces the issue with benchmarks, and provides practical recommendations to eliminate the slowdown.
DisruptorJNIJava
0 likes · 18 min read

This article analyzes why asynchronous Log4j2 logging becomes a performance bottleneck when handling massive mapping data, tracing the issue through Disruptor internals, stack‑trace location retrieval, and JNI calls, and proposes practical configuration and code adjustments to eliminate the slowdown.
DisruptorJNIJava
0 likes · 18 min read


21CTOOct 3, 2024 · Fundamentals
JDK 24, slated for a March 2025 release as a non‑LTS version, introduces JNI usage warnings, a G1 garbage‑collector post‑barrier extension, a finalized Class File API, and several potential enhancements, while offering six months of premium support following the recent JDK 23 launch.
Class File APIG1 garbage collectorJDK 24
0 likes · 6 min read

This guide explains how Java can communicate with industrial hardware by using the Modbus protocol with jLibModbus, accessing low‑level registers via JNI, and employing serial‑port libraries such as JSerialComm or RXTX, providing step‑by‑step setup, code examples, dependency configuration, and practical considerations for reliable device integration.
Hardware IntegrationIndustrial IoTJNI
0 likes · 19 min read

This article explains how to set up Rust for Android development, covering installation, creating a demo project, using JNI to call Rust functions, building the shared library, integrating it into an Android app, and designing a scalable architecture with event dispatch and Protobuf.
FFIJNIRust
0 likes · 12 min read

This article explains Netty’s reactor‑based asynchronous architecture, compares classic multithread, select, poll and epoll I/O multiplexing models, demonstrates Java‑C interaction via JNI, and provides a complete hand‑written epoll server implementation with detailed code and performance insights.
C++EpollIO Multiplexing
0 likes · 36 min read

The article explains how MJDK, Meituan's OpenJDK‑based distribution, integrates the Intel ISA‑L‑optimized mzlib library into java.util.zip, preserving API and format compatibility while delivering a five‑to‑ten‑fold increase in compression and decompression throughput, backed by benchmark results on the Silesia corpus.
CompressionISA‑LJNI
0 likes · 13 min read

The paper presents a DEX‑VMP scheme that encrypts Dalvik bytecode and executes it via a custom virtual machine and JNI bridge, merging the strengths of dynamic loading, hooking, instruction extraction, and java‑to‑C++ conversion while highlighting compatibility issues, performance overhead, and the need for selective protection of high‑value Android methods.
AndroidDEXJNI
0 likes · 17 min read

This article dissects Android's NFC implementation, detailing the layered architecture from the high‑level app down to the kernel driver, explaining each source‑code component, the initialization sequence, and how events travel through JNI, HAL, and the transport‑mapping layer to enable NFC functionality.
AndroidJNINFC
0 likes · 17 min read

The article shows how to shrink Android NDK .so binaries by over 30% through code de‑duplication, disabling exceptions/RTTI/iostream, using fine‑grained sections with LTO and dead‑code elimination, limiting exported symbols via version scripts, employing JNI dynamic registration, and consolidating C++ runtime dependencies into a shared library.
Android NDKBuild ConfigurationC++
0 likes · 13 min read

This article explains how to improve Android local‑search latency by embedding JavaScriptCore via JNI, detailing the performance bottlenecks, the integration workflow, essential JSC APIs, JNI usage patterns, and concrete C++/Java code examples that cut processing time by roughly half.
AndroidC++JNI
0 likes · 10 min read

This article presents the EJC (Electron‑Java‑C/C++) architecture adopted by ZhiZhuan’s quality‑inspection platform, detailing its layered design, communication modules, JNI/JNA integration, performance comparisons, and real‑world implementation for cross‑platform desktop tools, illustrating how the approach enhances extensibility, maintainability, and scalability.
C++ElectronJNA
0 likes · 17 min read

This article explains how Android transforms raw touch signals from the hardware into MotionEvent objects, routes them through the InputManagerService, InputReader, and InputDispatcher, and finally delivers them to the appropriate View or ViewGroup, detailing the roles of sockets, InputChannel, and the event‑dispatch chain.
AndroidInputDispatcherInputSystem
0 likes · 48 min read

GaiaX’s cross‑platform expression module uses a C++ LR(1) parser with lexical, syntax and semantic analysis to bind data, support arithmetic and functions, unify values via GXValue, bridge iOS and Android through JNI, and achieves sub‑millisecond execution for simple and nested expressions.
AndroidC++Compiler Theory
0 likes · 13 min read

This article investigates intermittent Java Agent errors caused by Instrumentation.appendToSystemClassLoaderSearch in container environments, tracing the issue through JNI calls, glibc stat failures, locale‑dependent iconv conversion, and ultimately fixing it with pthread thread‑local storage and proxy wrappers.
IConvJNIJava
0 likes · 11 min read

This article explains the main features of LuaJ, provides usage examples for calling Java static methods from Lua (including handling signatures and return values), demonstrates how to pass Lua functions to Java, and shows how to embed and execute Lua scripts within Java code.
JNIJavabridge
0 likes · 12 min read

This article explains how to use luaj, a Lua‑Java bridge, to call Java static methods from Lua, pass Lua functions to Java, handle method signatures, check call results, and manage error codes, providing practical code examples for seamless integration.
JNIJavaLua
0 likes · 9 min read

This article explains Netty's high‑performance asynchronous architecture, compares classic multithread, Reactor, select, poll and epoll I/O multiplexing models, describes level‑triggered versus edge‑triggered event handling, and provides a step‑by‑step JNI example and a hand‑written epoll server implementation in C.
BackendEpollIO Multiplexing
0 likes · 34 min read

This article explains how Netty implements a powerful asynchronous, event‑driven architecture using the Reactor pattern, compares classic multithread, select, poll and epoll I/O multiplexing models, demonstrates JNI integration with Java, and provides a complete, annotated epoll server example with level‑triggered and edge‑triggered handling for high‑concurrency backend development.
BackendEpollIO Multiplexing
0 likes · 32 min read

This article explains how Android native developers can capture and recover from controllable SIGSEGV crashes by registering signal handlers and using sigsetjmp/siglongjmp to emulate a try‑catch mechanism, complete with sample JNI code and practical considerations.
AndroidJNINative Crash
0 likes · 12 min read

This article provides a step‑by‑step guide on compiling, deploying, and testing the Hardcoder server on Android, covering pre‑integration checks, property configuration, socket communication, JNI performance APIs, protobuf integration, build scripts, init scripts, and SELinux policies.
AndroidHardcoderJNI
0 likes · 17 min read

This article explains Netty’s reactor‑based asynchronous architecture, compares classic multithread, select, poll and epoll models, demonstrates JNI integration with C code, and provides a complete hand‑written epoll server example to illustrate high‑performance backend networking in Java.
C++EpollIO Multiplexing
0 likes · 34 min read

This article explains Netty’s high‑performance asynchronous architecture, the evolution of I/O multiplexing models from select to poll and epoll, demonstrates Java‑C integration via JNI with detailed code examples, and provides a complete hand‑written epoll server in C for achieving million‑connection concurrency.
C++EpollIO Multiplexing
0 likes · 32 min read

Facing heavy GC overhead and slow model inference in a Java compute service, the authors explore using Java Native Interface to offload file loading and regression calculations to C++, detailing environment setup, Maven integration, native method implementation, common pitfalls, performance testing with JMH, and achieving up to 80% latency reduction.
C++JNIJava
0 likes · 20 min read

Meituan Search solves costly multi‑language maintenance by building a core C++ library, wrapping it with a C interface, and exposing the functions to Python via ctypes and to Java via JNI or JNA, enabling shared logic, easier packaging, and lower latency on Linux.
C++JNAJNI
0 likes · 31 min read


21CTOFeb 5, 2022 · Fundamentals
This article explains the JEP 423 proposal to fix regions in the G1 garbage collector, allowing Java threads to avoid pauses during JNI critical sections and reducing GC latency, while discussing implementation details, potential heap exhaustion risks, and upcoming JDK release timelines.
G1 GCJEP 423JNI
0 likes · 5 min read

This article explains how Java threads map to OS kernel threads, details the Thread.State lifecycle, shows how to create threads by extending Thread or implementing Runnable, and walks through the JNI mechanism and HotSpot source code that drives thread startup and execution.
ConcurrencyHotSpotJNI
0 likes · 13 min read

This article explores the feasibility of using Rust for UI rendering on Android by analyzing the rust-windowing ecosystem, detailing both software and hardware rendering approaches, explaining the integration of winit and glutin for cross-platform window and OpenGL context management, and demonstrating JNI-based communication with Android Surface components.
Android developmentJNIOpenGL ES
0 likes · 15 min read

This article explains the Android Property system, detailing its shared‑memory architecture, the trie‑based data structures (prop_bt, prop_area, prop_info), the initialization flow in the init process, the core C APIs for adding, reading, updating and iterating properties, and the Java SystemProperties wrapper used by applications.
AndroidC++JNI
0 likes · 23 min read

The project replaces karaoke effects with ASS‑based lyrics on Android, using a backend to generate ASS files and a JNI renderer that rasterizes and composites bitmap fragments; optimizations like transparent‑fragment filtering, opacity early‑out, NEON SIMD, copy elimination, and double‑buffered decoding cut frame time from 52 ms to under 3 ms, raise frame rate from 7 fps to 15 fps, and shrink memory usage from 180 MB to under 10 MB.
ASS subtitleJNINEON Optimization
0 likes · 16 min read

This article analyzes the restriction mechanism of hidden APIs in Android P Preview 1 and presents three verified techniques—direct module provisioning, class‑loader manipulation, and access‑flag tampering—that allow developers to invoke system hidden APIs without triggering runtime warnings.
AndroidAndroid PBypass
0 likes · 8 min read

This article analyzes Android P's hidden API restrictions, explains the underlying distinction mechanisms, and presents three practical techniques—direct calls with a provided module, classloader manipulation via reflection, and access flag tampering—to reliably invoke hidden system APIs on Android devices.
AndroidBypassHidden API
0 likes · 8 min read

This article explains how to access native C/C++ functions and complex structures from Java using JNI, JNA, and SWIG, compares their trade‑offs, provides type‑mapping tables, detailed code examples for struct definitions, passing, and callbacks, and offers practical tips for reliable cross‑language integration.
C++JNAJNI
0 likes · 9 min read

This article investigates an Android JNI native crash caused by misusing NewString(), examines why a custom UTF‑8‑to‑UTF‑16 conversion was used instead of NewStringUTF(), compares Dalvik and ART string encodings, reveals a Dalvik UTF‑8 conversion bug fixed in ART, and advises developers on encoding nuances across Android versions.
ARTAndroidDalvik
0 likes · 26 min read

The article outlines a systematic method for structuring native‑layer code and using dlopen, dlsym, and dlclose to dynamically load and unload .so libraries on Android, enabling selective loading, reduced memory usage, hot‑fix updates, and solutions to STL version, permission, and C++ name‑mangling challenges.
AndroidC++Dynamic Loading
0 likes · 14 min read

This article explains the background of Android app signing, outlines the core security objectives of confidentiality, integrity and availability, compares static and dynamic JNI registration methods, demonstrates native signature verification and certificate integrity checks, and summarizes common cracking techniques together with practical hardening solutions.
AndroidJNINative
0 likes · 16 min read

This article introduces Android NDK fundamentals, explains the Android layered architecture, clarifies the roles of SDK, NDK, and JNI, and provides a detailed step‑by‑step tutorial for creating and debugging native C/C++ projects in Android Studio.
JNINDKTutorial
0 likes · 8 min read

This tutorial explains how to build and integrate OpenSSL 1.1.0e for modern Android, iOS, and Linux environments, providing shell scripts for each platform, detailed configuration steps, and examples of using the resulting static libraries in C, JNI, and Java code.
AndroidC++Cross-compilation
0 likes · 10 min read

The article explains how upgrading the Android NDK introduces threading pitfalls such as ANR and FindClass failures, and provides step‑by‑step solutions using main‑thread class lookup, global references, and thread attachment to safely execute JNI calls in background threads.
AndroidFindClassJNI
0 likes · 4 min read

This tutorial demonstrates how to build a single, reusable SQLite library in Free Pascal using CodeTyphon, covering platform‑specific APIs, export conventions for Android, iOS, PC, and detailed compilation and usage examples across Android, iOS, macOS, Linux, and Windows.
AndroidCodeTyphonFree Pascal
0 likes · 9 min read

This article enumerates the typical traps encountered while developing an Android APK protection solution—such as signature verification, JNI library stripping, smali injection limits, magic‑number manipulation, and post‑obfuscation safeguards—and offers practical mitigation strategies for each.
APK protectionAndroid SecurityJNI
0 likes · 11 min read
