Questions tagged [jni]

The Java Native Interface (JNI) gives both the ability for JVM implementations to run system native code, and the ability for native code to run Java code (by creating new JVM instances). The most common target languages for JNI are C and C++, for which at least the Sun/Oracle JDK implementations provide helper commands (javap, javah).

Filter by
Sorted by
Tagged with
4
votes
2answers
59 views

Android NDK Low performance

I am trying to write a NDK program for quicksorting an array. However, in my benchmarks C is doing consistently worse than Java, as indicated by my results: Java 1190625 C 1809218 Java 895104 C ...
1
vote
0answers
39 views

A JavaFX for generating beeping sound on Windows via JNI

This is my practice program: a simple dialog box using which a user may specify a frequency of a sinus audio signal, and play it via pressing a button. It contains a GUI: App.java ...
1
vote
1answer
53 views

Optimizing loop - Reducing native calls

I am developing Android-Disassembler. I need to optimize the loop below. It is currectly calling native method for each instructions(about 4 bytes). So this loop will be looped about millions of ...
3
votes
2answers
493 views

Makefile for a small JNI project

So I'm going to publish this small project on GitHub and I thought I'd better do a makefile for it. The source code consists of 1 Java Class 1 Native JNI module written in C 1 stdlib wrapper object ...
4
votes
1answer
66 views

Video frame to Minecraft map colors

I'm still somewhat new to C, so pardon me for any silly mistakes I've made. I'm trying to convert video frames into Minecraft map colors using JNI and ...
6
votes
1answer
473 views

Having fun with JNI: formatting a number

I attempted some (easy) coding with Java Native Interface. This is what I have: six_pack_Neatifier.h: (autogenerated by javah) ...