Skip to main content

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).

4 votes
2 answers
330 views

I had some multithreading C programming experience from school last year but I wanted a bit more so I tried to program a Conway's Game of Life implementation from scratch. Code is mainly written in C ...
Shmuel Newmark's user avatar
5 votes
1 answer
369 views

I'm implementing a JNI library that needs to dispose a few native objects after use. The main library class implements Closeable and is almost always used within ...
Juan Lopes's user avatar
5 votes
1 answer
534 views

I am working on a project which uses JNI. More than once I fell over the absence of type safety working with the variardic function calls. So I came up with this module. It wraps the variardic JNI ...
Hermann's user avatar
  • 163
6 votes
1 answer
410 views

I'm working on a design for a video buffer in C++ that will be used by many consumers both in the native library space(C++) as well as Java side using JNI. My Idea is the following: Have a buffer ...
eliranno's user avatar
2 votes
2 answers
891 views

I want to compare the performance difference between using byte[] and ByteBuffer in Java, which approach I should use in my ...
user10931326's user avatar
4 votes
2 answers
301 views

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 ...
Bill's user avatar
  • 43
2 votes
0 answers
776 views

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 ...
coderodde's user avatar
  • 32.3k
1 vote
1 answer
125 views

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 ...
Hyeonseo Yang's user avatar
3 votes
2 answers
1k views

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 ...
Rodney's user avatar
  • 203
4 votes
1 answer
109 views

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 ...
Cirno's user avatar
  • 43
6 votes
1 answer
663 views

I attempted some (easy) coding with Java Native Interface. This is what I have: six_pack_Neatifier.h: (autogenerated by javah) ...
coderodde's user avatar
  • 32.3k